|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.javasource.JNaming
public final class JNaming
A utility class used to validate identifiers and class names.
Method Summary | |
---|---|
static java.lang.String |
getLocalNameFromClassName(java.lang.String className)
Returns the local class name from the given fully qualified class name. |
static java.lang.String |
getPackageFromClassName(java.lang.String className)
Returns the package name from the given class name. |
static boolean |
isInJavaLang(java.lang.String name)
Returns true if the given String is a Java class in java.lang.* which will cause a problem when used as a variable name. |
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. |
static boolean |
isParameterizedCollectionsObject(java.lang.String name)
Returns true if the given String is a parameterized Java collection. |
static boolean |
isReservedByCastor(java.lang.String name)
Returns true if the given String is a reserved name by Castor which may cause a problem when used as a variable name. |
static boolean |
isReservedByWindows(java.lang.String name)
Returns true if the given String is a reserved name by the Windows filesystem which will cause a problem when used as a class name under Windows. |
static boolean |
isValidJavaIdentifier(java.lang.String string)
Returns true if the given String matches the production of a valid Java identifier. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean isKeyword(java.lang.String name)
name
- The String to check against the list of keywords.
public static boolean isParameterizedCollectionsObject(java.lang.String name)
name
- The String to check as a parameterized Java collection.
public static boolean isInJavaLang(java.lang.String name)
name
- The String to check against the list of keywords.
public static boolean isReservedByCastor(java.lang.String name)
name
- The String to check against the list of keywords.
public static boolean isReservedByWindows(java.lang.String name)
name
- The String to check against the list of keywords.
public static boolean isValidJavaIdentifier(java.lang.String string)
string
- The String to check the production of.
public static java.lang.String getPackageFromClassName(java.lang.String className)
className
- An arbitrary class name, optionally including a package.
public static java.lang.String getLocalNameFromClassName(java.lang.String className)
className
- An arbitrary class name, optionally including a package.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |