org.apache.bcel.generic
public abstract class Type extends Object implements Serializable
Version: $Id: Type.java 152824 2002-08-07 18:01:32Z mdahm $
| Field Summary | |
|---|---|
| static BasicType | BOOLEAN |
| static BasicType | BYTE |
| static BasicType | CHAR |
| static BasicType | DOUBLE |
| static BasicType | FLOAT |
| static BasicType | INT |
| static BasicType | LONG |
| static Type[] | NO_ARGS |
| static ReferenceType | NULL |
| static ObjectType | OBJECT |
| protected String | signature |
| static BasicType | SHORT |
| static ObjectType | STRING |
| static ObjectType | STRINGBUFFER |
| protected byte | type |
| static ObjectType | THROWABLE |
| static Type | UNKNOWN |
| static BasicType | VOID Predefined constants |
| Constructor Summary | |
|---|---|
| protected | Type(byte t, String s) |
| Method Summary | |
|---|---|
| static Type[] | getArgumentTypes(String signature)
Convert arguments of a method (signature) to an array of Type objects. |
| static String | getMethodSignature(Type return_type, Type[] arg_types)
Convert type to Java method signature, e.g. int[] f(java.lang.String x)
becomes (Ljava/lang/String;)[I
|
| static Type | getReturnType(String signature)
Convert return value of a method (signature) to a Type object.
|
| String | getSignature() |
| static String | getSignature(Method meth) |
| int | getSize() |
| byte | getType() |
| static Type | getType(String signature)
Convert signature to a Type object. |
| static Type | getType(Class cl) Convert runtime java.lang.Class to BCEL Type object. |
| String | toString() |
Parameters: signature signature string such as (Ljava/lang/String;)V
Returns: array of argument types
Parameters: return_type what the method returns arg_types what are the argument types
Returns: method signature for given type(s).
Parameters: signature signature string such as (Ljava/lang/String;)V
Returns: return type
Returns: signature for given type.
Returns: stack size of this type (2 for long and double, 0 for void, 1 otherwise)
Returns: type as defined in Constants
Parameters: signature signature string such as Ljava/lang/String;
Returns: type object
Parameters: cl Java class
Returns: corresponding Type object
Returns: Type string, e.g. `int[]'