2 * Copyright 2000-2007 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package com
.intellij
.util
.xml
;
19 * Specifies how method names are converted into XML element names
23 public abstract class DomNameStrategy
{
26 * @param propertyName property name, i.e. method name without first 'get', 'set' or 'is'
27 * @return XML element name
29 public abstract String
convertName(String propertyName
);
32 * Is used to get presentable DOM elements in UI
33 * @param xmlElementName XML element name
34 * @return Presentable DOM element name
36 public abstract String
splitIntoWords(final String xmlElementName
);
39 * This strategy splits property name into words, decapitalizes them and joins using hyphen as separator,
40 * e.g. getXmlElementName() will correspond to xml-element-name
42 public static final DomNameStrategy HYPHEN_STRATEGY
= new HyphenNameStrategy();
44 * This strategy decapitalizes property name, e.g. getXmlElementName() will correspond to xmlElementName
46 public static final DomNameStrategy JAVA_STRATEGY
= new JavaNameStrategy();