public class TypeHelper extends Object
Constructor | Description |
---|---|
TypeHelper() |
Modifier and Type | Method | Description |
---|---|---|
static boolean |
equalDescriptors(String desc1,
String desc2) |
|
static String |
externalizeClass(String className) |
convert a classname from canonical form to the form used to represent it externally i.e.
|
static String |
externalizeDescriptor(String desc) |
convert a method descriptor from canonical form to the form used to represent it externally
|
static String |
externalizeType(String typeName) |
convert a type name from canonical form to the form used to represent it externally i.e.
|
static String |
internalizeClass(String className) |
convert a classname from external form to canonical form i.e.
|
static String |
internalizeDescriptor(String desc) |
convert a method descriptor from the form used to represent it externally to canonical form
|
static String |
parseMethodDescriptor(String targetMethod) |
split off the signature following the method name and return it
|
static String |
parseMethodName(String targetMethod) |
split off the method name preceding the signature and return it
|
public static String externalizeClass(String className)
className
- the canonical namepublic static String internalizeClass(String className)
className
- the external namepublic static String externalizeType(String typeName)
typeName
- the type namepublic static String externalizeDescriptor(String desc)
desc
- the method descriptor which must be trimmed of any surrounding white spacepublic static String internalizeDescriptor(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 String parseMethodName(String targetMethod)
targetMethod
- - the unqualified method name, possibly including signatureCopyright © 2018. All rights reserved.