Class JNaming
- java.lang.Object
-
- org.codehaus.modello.plugin.java.javasource.JNaming
-
class JNaming extends java.lang.Object
A utility class used to validate identifiers and class names- Version:
- $Revision$ $Date$
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String[]
keywords
-
Constructor Summary
Constructors Modifier Constructor Description private
JNaming()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isKeyword(java.lang.String name)
Returns true if the given String is a Java keyword which will cause a problem when used as a variable namestatic boolean
isValidJavaIdentifier(java.lang.String string)
Returns true if the given String matches the production of a valid Java identifier
-
-
-
Method Detail
-
isKeyword
public static boolean isKeyword(java.lang.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(java.lang.String string)
Returns true if the given String matches the production of a valid Java identifier- Parameters:
string
- , the String to check the production of- Returns:
- true if the given String matches the production of a valid Java name, otherwise false
-
-