| Modifier and Type | Field and Description |
|---|---|
static String[] |
KEYWORDS
All the java keywords + 'true', 'false' 'null' literals
|
| Modifier and Type | Method and Description |
|---|---|
static String |
deleteWhitespaces(String string)
Deletes all white-spaces from the given string.
|
static boolean |
isKeyword(String identifier)
Checks a given string if it is a java keyword.
|
static String |
toPackage(String pakkage)
This operation turns the given string in a valid java package by eliminating all illegal characters at which the
dot character
'.' is also considered illegal at the beginning and at the end of the string. |
public static final String[] KEYWORDS
public static String deleteWhitespaces(String string)
string - the string that whose white-spaces shall be removednull if the given string was nullpublic static boolean isKeyword(String identifier)
null is not considered a java
keyword.identifier - the string to check if it is a java keywordKEYWORDSpublic static String toPackage(String pakkage)
'.' is also considered illegal at the beginning and at the end of the string.
Additionally it checks if the resulting package identifiers are java keywords and appends a '_' if so. If the
given string is null then null is returned. If the given string is empty an empty
string is returned.pakkage - the string to turn into a valid java package nameisKeyword(java.lang.String)Copyright © 2012–2026 cismet GmbH. All rights reserved.