public class TypeHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.lang.String[] |
externalNames
list of typenames in external form corresponding to entries ni previous list
|
private static java.lang.String[] |
internalNames
list of well known typenames as written in Java code
|
Constructor and Description |
---|
TypeHelper() |
Modifier and Type | Method and Description |
---|---|
static boolean |
equalDescriptors(java.lang.String desc1,
java.lang.String desc2) |
static java.lang.String |
externalizeClass(java.lang.String className)
convert a classname from canonical form to the form used to represent it externally i.e.
|
static java.lang.String |
externalizeDescriptor(java.lang.String desc)
convert a method descriptor from canonical form to the form used to represent it externally
|
static java.lang.String |
externalizeType(java.lang.String typeName)
convert a type name from canonical form to the form used to represent it externally i.e.
|
static java.lang.String |
internalizeClass(java.lang.String className)
convert a classname from external form to canonical form i.e.
|
static java.lang.String |
internalizeDescriptor(java.lang.String desc)
convert a method descriptor from the form used to represent it externally to canonical form
|
static java.lang.String |
parseMethodDescriptor(java.lang.String targetMethod)
split off the signature following the method name and return it
|
static java.lang.String |
parseMethodName(java.lang.String targetMethod)
split off the method name preceding the signature and return it
|
private static final java.lang.String[] internalNames
private static final java.lang.String[] externalNames
public static boolean equalDescriptors(java.lang.String desc1, java.lang.String desc2)
public static java.lang.String externalizeClass(java.lang.String className)
className
- public static java.lang.String internalizeClass(java.lang.String className)
className
- public static java.lang.String externalizeType(java.lang.String typeName)
typeName
- public static java.lang.String externalizeDescriptor(java.lang.String desc)
desc
- the method descriptor which must be trimmed of any surrounding white spacepublic static java.lang.String internalizeDescriptor(java.lang.String desc)
desc
- the method descriptor which must be trimmed of any surrounding white space and start with "(".
it must end either with ")" or with ") " followed by an exernalized return typepublic static java.lang.String parseMethodName(java.lang.String targetMethod)
targetMethod
- - the unqualified method name, possibly including signaturepublic static java.lang.String parseMethodDescriptor(java.lang.String targetMethod)
targetMethod
- - the unqualified method name, possibly including signature