| |
|
| java.lang.Object com.tc.aspectwerkz.definition.DescriptorUtil
DescriptorUtil | public class DescriptorUtil (Code) | | The signature of a method that is available from the BCEL library uses descriptors as defined in Section 4.3 of the
Java Virtual Machine specificaiton. Javadoc and Java do not use signatures in this same format. This class converts
the Javadoc/Java signature format to that used by the JVM spec. To summarize the descriptors A method
descriptor represents the parameters that the method takes and the value that it returns:
MethodDescriptor: ( ParameterDescriptor* ) ReturnDescriptor
A parameter descriptor represents a parameter passed to a method:
ParameterDescriptor: FieldType
A return descriptor represents the type of the value returned from a method. It is a series of characters generated
by the grammar:
ReturnDescriptor: FieldType V
The character V indicates that the method returns no value (its return type is void).
A field descriptor represents the type of a class, instance, or local variable. It is a series of characters
generated by the grammar:
FieldDescriptor: FieldType
ComponentType: FieldType
FieldType: BaseType ObjectType ArrayType
BaseType: B C D F I J S Z
ObjectType: L ;
ArrayType: [ ComponentType
The characters of BaseType, the L and ; of ObjectType, and the [ of ArrayType are all ASCII characters. The
represents a fully qualified class or interface name. For historical reasons it is encoded in internal
form (4.2). The interpretation of the field types is as shown in Table 4.2.
BaseType Character Type Interpretation ---------------------------------------------- B byte
signed byte C char Unicode character D double double-precision
floating-point value F float single-precision floating-point value I int
integer J long long integer L; reference an instance of class S
short signed short Z boolean true or false [ reference one array dimension
author: Mark Pollack |
Method Summary | |
public static String | convert(String javadocSig, String javadocReturnType) Converts from the Java/Javadoc method signature the JVM spec format.
Parameters: javadocSig - method signature as returned via Javadoc API. Parameters: javadocReturnType - return type as returned via Javadoc API. | public static String[] | getParameters(String jvmSignature) Convert a JVM signature as defined in the JVM spec to that used in the Java.
Parameters: jvmSignature - The JVM format signature. |
convert | public static String convert(String javadocSig, String javadocReturnType)(Code) | | Converts from the Java/Javadoc method signature the JVM spec format.
Parameters: javadocSig - method signature as returned via Javadoc API. Parameters: javadocReturnType - return type as returned via Javadoc API. mtehod signature as defined in the JVM spec. |
getParameters | public static String[] getParameters(String jvmSignature)(Code) | | Convert a JVM signature as defined in the JVM spec to that used in the Java.
Parameters: jvmSignature - The JVM format signature. a String[] containing the method parameter as elements of the array. |
|
|
|