org.apache.bcel.generic
public abstract class Type extends Object implements Serializable
Version: $Id: Type.java 393344 2006-04-12 00:38:34Z tcurdt $
| Field Summary | |
|---|---|
| static BasicType | BOOLEAN |
| static BasicType | BYTE |
| static ThreadLocal | consumed_chars |
| static BasicType | CHAR |
| static ObjectType | CLASS |
| 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 | |
|---|---|
| boolean | equals(Object o) |
| 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. |
| static Type[] | getTypes(Class[] classes)
Convert runtime java.lang.Class[] to BCEL Type objects. |
| int | hashCode() |
| String | toString() |
| static int | unwrap(ThreadLocal tl) |
| static void | wrap(ThreadLocal tl, int value) |
Returns: whether the Types are equal
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
Parameters: classes an array of runtime class objects
Returns: array of corresponding Type objects
Returns: hashcode of Type
Returns: Type string, e.g. `int[]'