org.apache.ws.jaxme.generator.util

Class JavaNamer


public class JavaNamer
extends java.lang.Object

Author:
Ias

Field Summary

static char[]
PUNCTUATION_CHARS
punctuation characters defined in JAXB spec

Method Summary

static String
convert(String pLocalName, SchemaSG pSchema)
Convert a local part name in XML to a class or field name in Java.
static boolean
isPunctuationCharacter(char c, SchemaSG pSchema)
Check whether the given character is a punctuation one or not.

Field Details

PUNCTUATION_CHARS

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

Method Details

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.