org.apache.ws.jaxme.generator.util

Class JavaNamer

public class JavaNamer extends Object

Author: Ias

Field Summary
static char[]PUNCTUATION_CHARS
punctuation characters defined in JAXB spec
Method Summary
static Stringconvert(String pLocalName, SchemaSG pSchema)
Convert a local part name in XML to a class or field name in Java.
static booleanisPunctuationCharacter(char c, SchemaSG pSchema)
Check whether the given character is a punctuation one or not.

Field Detail

PUNCTUATION_CHARS

public static final char[] PUNCTUATION_CHARS
punctuation characters defined in JAXB spec

Method Detail

convert

public static String convert(String pLocalName, SchemaSG pSchema)
Convert a local part name in XML to a class or field name in Java.

Parameters: pLocalName a given local name pSchema hint for following Java naming conventions and handling underscore

Returns: the converted name based on the given hints.

isPunctuationCharacter

public static boolean isPunctuationCharacter(char c, SchemaSG pSchema)
Check whether the given character is a punctuation one or not.

Parameters: c character to check out pSchema hint for handling underscore

Returns: true if c belongs to the punctuation characters, otherwise false.