com.legstar.jaxb.plugin
Class CobolJAXBAnnotator.EciCompatibleNameConverter

java.lang.Object
  extended by com.sun.xml.bind.api.impl.NameConverter.Standard
      extended by com.legstar.jaxb.plugin.CobolJAXBAnnotator.WinCompatibleNameConverter
          extended by 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 Class Summary
 
Nested classes/interfaces inherited from interface com.sun.xml.bind.api.impl.NameConverter
com.sun.xml.bind.api.impl.NameConverter.Standard
 
Field Summary
protected static int DIGIT
           
protected static int LOWER_LETTER
           
protected static int OTHER
           
protected static int OTHER_LETTER
           
protected static int UPPER_LETTER
           
 
Fields inherited from interface com.sun.xml.bind.api.impl.NameConverter
jaxrpcCompatible, smart, standard
 
Constructor Summary
protected CobolJAXBAnnotator.EciCompatibleNameConverter()
           
 
Method Summary
 String capitalize(String s)
          Don't uppercase systematically like JAXB does.
protected  int classify(char c0)
          Underscore is a regular letter.
static void escape(StringBuilder arg0, String arg1, int arg2)
           
protected static boolean isDigit(char arg0)
           
static boolean isJavaIdentifier(String arg0)
           
static boolean isJavaPackageName(String arg0)
           
protected  boolean isLetter(char c)
          Underscore is a regular letter.
protected static boolean isLower(char arg0)
           
protected  boolean isPunct(char c)
          Underscore is not a punctuation.
protected static boolean isUpper(char arg0)
           
 String toConstantName(List<String> arg0)
           
protected  String toMixedCaseName(List<String> ss, boolean startUpper)
          Makes sure only the first character is uppercased when needed.
protected  String toMixedCaseVariableName(String[] arg0, boolean arg1, boolean arg2)
           
 List<String> toWordList(String arg0)
           
 
Methods inherited from class com.legstar.jaxb.plugin.CobolJAXBAnnotator.WinCompatibleNameConverter
toClassName
 
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
 

Field Detail

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
Constructor Detail

CobolJAXBAnnotator.EciCompatibleNameConverter

protected CobolJAXBAnnotator.EciCompatibleNameConverter()
Method Detail

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.