public final class NamingUtil
extends java.lang.Object
| Modifier and Type | Method and Description | 
|---|---|
static boolean | 
isJavaIdentifier(java.lang.String name)
Returns  
true if the specified String is a valid
 Java identifier. | 
static boolean | 
isJavaImport(java.lang.String name)
Returns  
true if the specified String is one or
 more identifiers separated by periods, optionally followed by ".*". | 
static boolean | 
isJavaKeyword(java.lang.String name)
Is the specified name a Java keyword in the latest JDK? 
 | 
static boolean | 
isJavaKeyword(java.lang.String name,
             JdkVersion jdkVersion)
Is the specified name a Java keyword in the specified JDK? 
 | 
static boolean | 
isJavaReservedWord(java.lang.String name)
Returns  
true if the specified String is a Java
 reserved word in the latest JDK. | 
static boolean | 
isJavaReservedWord(java.lang.String name,
                  JdkVersion jdkVersion)
Returns  
true if the specified String is a Java
 reserved word in the specified JDK. | 
static boolean | 
isPackageIdentifier(java.lang.String name)
Returns  
true if the specified String is one or
 more identifiers separated by periods. | 
public static boolean isJavaKeyword(java.lang.String name)
name - the name to testpublic static boolean isJavaKeyword(java.lang.String name,
                                    JdkVersion jdkVersion)
name - the name to testjdkVersion - A JdkVersion which should not be nullpublic static boolean isJavaReservedWord(java.lang.String name)
true if the specified String is a Java
 reserved word in the latest JDK.  A Java reserved word is either a
 keyword, a boolean literal, or the null literal.name - the String to test.public static boolean isJavaReservedWord(java.lang.String name,
                                         JdkVersion jdkVersion)
true if the specified String is a Java
 reserved word in the specified JDK.  A Java reserved word is either
 a keyword, a boolean literal, or the null literal.name - the String to test.jdkVersion - A JdkVersion which should not be nullpublic static boolean isJavaIdentifier(java.lang.String name)
true if the specified String is a valid
 Java identifier.name - the String to test.public static boolean isPackageIdentifier(java.lang.String name)
true if the specified String is one or
 more identifiers separated by periods.name - the String to test.public static boolean isJavaImport(java.lang.String name)
true if the specified String is one or
 more identifiers separated by periods, optionally followed by ".*".name - the String to test.