public final class JJavaName extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isFullyQualifiedClassName(String sName)
Checks if the given string is a valid fully qualified name.
|
static boolean |
isJavaIdentifier(String sStr)
Checks if a given string is usable as a Java identifier.
|
static boolean |
isJavaPackageName(String sName)
Checks if the given string is a valid Java package name.
|
static boolean |
isJavaReservedKeyword(String sStr)
Check if the passed string is Java keyword or not.
|
public static boolean isJavaReservedKeyword(@Nonnull String sStr)
sStr - The string to be checked.true if the string is a Java keyword,
false if not.public static boolean isJavaIdentifier(@Nonnull String sStr)
sStr - Source string. May not be null.true if the string is a valid Java identifierpublic static boolean isFullyQualifiedClassName(String sName)
sName - Source string to checktrue if it is a valid fully qualified class namepublic static boolean isJavaPackageName(String sName)
sName - Source string to checktrue if it is a valid Java package nameCopyright © 2013–2019 Philip Helger. All rights reserved.