public class Name extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Name.BinaryName
Represents a Java class name in binary form, for example:
org.example.Foo$Bar . |
static class |
Name.InternalName
Represents a Java class name in internal form, for example:
org/example/Foo$Bar . |
static class |
Name.SourceOrBinaryName
Represents a Java class name in either source or binary form, for example:
org.example.Foo.Bar or org.example.Foo$Bar . |
Modifier and Type | Method and Description |
---|---|
static String |
getBinaryNameForClass(Class<?> clazz)
Get the binary name for a Java class.
|
static String |
getInternalNameForClass(Class<?> clazz)
Get the internal name for a Java class.
|
static String |
getSourceNameForClass(Class<?> clazz)
Get the source name for a Java class.
|
static boolean |
isBinaryName(String name) |
static boolean |
isInternalName(String name) |
static boolean |
isSourceName(String name) |
public static String getBinaryNameForClass(Class<?> clazz)
clazz
- class literalpublic static String getInternalNameForClass(Class<?> clazz)
clazz
- class literalpublic static String getSourceNameForClass(Class<?> clazz)
clazz
- class literalpublic static boolean isBinaryName(String name)
name
- class name to testpublic static boolean isInternalName(String name)
name
- class name to testpublic static boolean isSourceName(String name)
name
- class name to testCopyright © 2018. All rights reserved.