Package io.github.sandydunlop.markista.util
Class NameUtils
java.lang.Object
io.github.sandydunlop.markista.util.NameUtils
Constructor Summary
Constructor | Description |
---|---|
NameUtils() |
Method Summary
Modifier and Type | Method | Description |
---|---|---|
static String | simplifyNames(String str) | Changes all qualified names in a string into unqualified names. |
static String | simplifyGenerics(String str) | Changes qualified generic names to unqualified generic names. |
static boolean | isValidSimpleNameChar(char c) | Checks if the given character is valid in an unqualified name. |
static boolean | isValidQualifiedNameChar(char c) | Checks if the given character is valid in a qualified name. |
Method Details
simplifyNames
static String simplifyNames(String str)
Changes all qualified names in a string into unqualified names.
Parameters:
str
- Changes all qualified names in a string into unqualified names.
Returns:
[The input string, with all qualified names changed to unqualified names.]
simplifyGenerics
static String simplifyGenerics(String str)
Changes qualified generic names to unqualified generic names.
Parameters:
str
- Changes qualified generic names to unqualified generic names.
Returns:
[A string with the qualified names changed to unqualified names.]
isValidSimpleNameChar
static boolean isValidSimpleNameChar(char c)
Checks if the given character is valid in an unqualified name.
Parameters:
c
- Checks if the given character is valid in an unqualified name.
Returns:
[Whether or not the character is valid in an unqualified name.]
isValidQualifiedNameChar
static boolean isValidQualifiedNameChar(char c)
Checks if the given character is valid in a qualified name.
Parameters:
c
- Checks if the given character is valid in a qualified name.
Returns:
[Whether or not the character is valid in a qualified name.]