org.exolab.castor.xml
Class JavaNaming
java.lang.Object
org.exolab.castor.xml.JavaNaming
public class JavaNaming
extends java.lang.Object
This class converts XML Names to proper Java names.
Also see Unmarshaller and Marshaller since they use some
of their own methods for now.
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:10 $static String | UPPER_CASE_AFTER_UNDERSCORE_PROPERTY - The property name to use in the castor.properties file to specify
the value of the
upperCaseAfterUnderscore variable.
|
static boolean | upperCaseAfterUnderscore - Used for backward compatibility, if you wish
to be backward compatible with 0.9.3.9 and earlier
set this boolean to true.
|
static boolean | isKeyword(String name) - Returns true if the given String is a Java keyword which
will cause a problem when used as a variable name
|
static boolean | isValidJavaIdentifier(String string) - Returns true if the given String matches the
production of a valid Java identifier
|
static String | packageToPath(String packageName) - Converts the given Package name to it's corresponding
Path.
|
static String | toJavaClassName(String name)
|
static String | toJavaMemberName(String name)
|
static String | toJavaMemberName(String name, boolean useKeywordSubstitutions)
|
UPPER_CASE_AFTER_UNDERSCORE_PROPERTY
public static final String UPPER_CASE_AFTER_UNDERSCORE_PROPERTY
The property name to use in the castor.properties file to specify
the value of the upperCaseAfterUnderscore
variable.
upperCaseAfterUnderscore
public static boolean upperCaseAfterUnderscore
Used for backward compatibility, if you wish
to be backward compatible with 0.9.3.9 and earlier
set this boolean to true.
isKeyword
public static boolean isKeyword(String name)
Returns true if the given String is a Java keyword which
will cause a problem when used as a variable name
isValidJavaIdentifier
public static boolean isValidJavaIdentifier(String string)
Returns true if the given String matches the
production of a valid Java identifier
- true if the given String matches the
production of a valid Java name, otherwise false
packageToPath
public static String packageToPath(String packageName)
Converts the given Package name to it's corresponding
Path. The path will be a relative path.
toJavaClassName
public static String toJavaClassName(String name)
toJavaMemberName
public static String toJavaMemberName(String name)
toJavaMemberName
public static String toJavaMemberName(String name,
boolean useKeywordSubstitutions)
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com