org.codehaus.janino
public class Descriptor extends Object
Typical descriptors are:
I
Integer
[I
Array of integer
Lpkg1/pkg2/Cls;
Class
Lpkg1/pkg2/Outer$Inner;
Member class
Field Summary | |
---|---|
static String | BOOLEAN |
static String | BOOLEAN_ |
static String | BYTE |
static String | BYTE_ |
static String | CHARACTER |
static String | CHAR_ |
static String | CLASS |
static String | CLONEABLE |
static String | DOUBLE |
static String | DOUBLE_ |
static String | ERROR |
static String | FLOAT |
static String | FLOAT_ |
static String | INTEGER |
static String | INT_ |
static String | LONG |
static String | LONG_ |
static String | OBJECT |
static String | RUNTIME_EXCEPTION |
static String | SERIALIZABLE |
static String | SHORT |
static String | SHORT_ |
static String | STRING |
static String | STRING_BUFFER |
static String | STRING_BUILDER |
static String | THROWABLE |
static String | VOID_ |
Method Summary | |
---|---|
static boolean | areInSamePackage(String d1, String d2)
Check whether two reference types are declared in the same package. |
static String | fromClassName(String className)
Convert a class name as defined by "Class.getName()" into a
descriptor. |
static String | fromInternalForm(String internalForm)
Convert a class name in the "internal form" as described in JVMS 4.2 into a descriptor.
|
static String | getComponentDescriptor(String d) |
static String | getPackageName(String d)
Returns the package name of a class or interface reference descriptor,
or null if the class or interface is declared in the
default package. |
static boolean | hasSize1(String d) |
static boolean | hasSize2(String d) |
static boolean | isArrayReference(String d) |
static boolean | isClassOrInterfaceReference(String d) |
static boolean | isPrimitive(String d) |
static boolean | isPrimitiveNumeric(String d) |
static boolean | isReference(String d) |
static short | size(String d) |
static String | toClassName(String d)
Convert a field descriptor into a class name as defined by Class#getName(). |
static String | toInternalForm(String d)
Convert a descriptor into the "internal form" as defined by JVMS 4.2. |
static String | toString(String d) |
Also implement the encoding of array types as described in JVMS 4.4.1.
null
if the class or interface is declared in the
default package.