com.legstar.jaxb.plugin
Class CobolJAXBAnnotator.EciCompatibleNameConverter
java.lang.Object
com.sun.xml.bind.api.impl.NameConverter.Standard
com.legstar.jaxb.plugin.CobolJAXBAnnotator.WinCompatibleNameConverter
com.legstar.jaxb.plugin.CobolJAXBAnnotator.EciCompatibleNameConverter
- All Implemented Interfaces:
- com.sun.xml.bind.api.impl.NameConverter
- Enclosing class:
- CobolJAXBAnnotator
protected class CobolJAXBAnnotator.EciCompatibleNameConverter
- extends CobolJAXBAnnotator.WinCompatibleNameConverter
This overrides the standard JAXB name converter when in ECI compatible
mode.
ECI does not remove underscores from variable names like the standard
JAXB name converter does. The code here borrows from
underscoreBinding=asCharInWord JAXB option.
Also ECI does not uppercase tokens following underscores like JAXB does.
Nested classes/interfaces inherited from interface com.sun.xml.bind.api.impl.NameConverter |
com.sun.xml.bind.api.impl.NameConverter.Standard |
Fields inherited from interface com.sun.xml.bind.api.impl.NameConverter |
jaxrpcCompatible, smart, standard |
Methods inherited from class com.sun.xml.bind.api.impl.NameConverter.Standard |
toConstantName, toInterfaceName, toPackageName, toPropertyName, toVariableName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UPPER_LETTER
protected static final int UPPER_LETTER
- See Also:
- Constant Field Values
LOWER_LETTER
protected static final int LOWER_LETTER
- See Also:
- Constant Field Values
OTHER_LETTER
protected static final int OTHER_LETTER
- See Also:
- Constant Field Values
DIGIT
protected static final int DIGIT
- See Also:
- Constant Field Values
OTHER
protected static final int OTHER
- See Also:
- Constant Field Values
CobolJAXBAnnotator.EciCompatibleNameConverter
protected CobolJAXBAnnotator.EciCompatibleNameConverter()
isPunct
protected boolean isPunct(char c)
- Underscore is not a punctuation.
isLetter
protected boolean isLetter(char c)
- Underscore is a regular letter.
classify
protected int classify(char c0)
- Underscore is a regular letter.
toMixedCaseName
protected String toMixedCaseName(List<String> ss,
boolean startUpper)
- Makes sure only the first character is uppercased when needed.
capitalize
public String capitalize(String s)
- Don't uppercase systematically like JAXB does.
isDigit
protected static boolean isDigit(char arg0)
isUpper
protected static boolean isUpper(char arg0)
isLower
protected static boolean isLower(char arg0)
toWordList
public List<String> toWordList(String arg0)
toMixedCaseVariableName
protected String toMixedCaseVariableName(String[] arg0,
boolean arg1,
boolean arg2)
toConstantName
public String toConstantName(List<String> arg0)
escape
public static void escape(StringBuilder arg0,
String arg1,
int arg2)
isJavaIdentifier
public static boolean isJavaIdentifier(String arg0)
isJavaPackageName
public static boolean isJavaPackageName(String arg0)
Copyright © 2015 LegSem. All Rights Reserved.