| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static HashSet | reservedKeywords
All reserved keywords of Java. |
| private static final JJavaName. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static String | Returns: always non-null.a word, such as "child", "apple". Must not be null.
It accepts word concatanation forms
that are common in programming languages, such as "my_child", "MyChild",
"myChild", "MY-CHILD", "CODE003-child", etc, and mostly tries to do the right thing.
("my_children","MyChildren","myChildren", and "MY-CHILDREN", "CODE003-children" respectively)
word)Although this method only works for English words, it handles non-English words gracefully (by just returning it as-is.) For example, "日本語" will be returned as-is without modified, not "日本語s" This method doesn't handle suffixes very well. For example, passing "person56" will return "person56s", not "people56". Experimental API: converts an English word into a plural form. |
| public static boolean | |
| public static boolean | |
| public static boolean |
| reservedKeywords | back to summary |
|---|---|
| private static HashSet<String> reservedKeywords All reserved keywords of Java. | |
| TABLE | back to summary |
|---|---|
| private static final JJavaName. | |
| JJavaName | back to summary |
|---|---|
| private JJavaName() | |
| getPluralForm | back to summary |
|---|---|
| public static String getPluralForm(String word) Experimental API: converts an English word into a plural form.
| |
| isFullyQualifiedClassName | back to summary |
|---|---|
| public static boolean isFullyQualifiedClassName(String s) Checks if the given string is a valid fully qualified name. | |
| isJavaIdentifier | back to summary |
|---|---|
| public static boolean isJavaIdentifier(String s) Checks if a given string is usable as a Java identifier. | |
| isJavaPackageName | back to summary |
|---|---|
| public static boolean isJavaPackageName(String s) Checks if the given string is a valid Java package name. | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv String |
| pattern | back to summary |
|---|---|
| private final Pattern pattern | |
| replacement | back to summary |
|---|---|
| private final String replacement | |
| Entry | back to summary |
|---|---|
| public Entry(String pattern, String replacement) | |
| apply | back to summary |
|---|---|
| pack-priv String apply(String word) | |