|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.bcel.generic.Type
public abstract class Type
Abstract super class for all possible java types, namely basic types such as int, object types like String and array types, e.g. int[]
Field Summary | |
---|---|
static BasicType |
BOOLEAN
|
static BasicType |
BYTE
|
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
|
static BasicType |
SHORT
|
protected String |
signature
|
static ObjectType |
STRING
|
static ObjectType |
STRINGBUFFER
|
static ObjectType |
THROWABLE
|
protected byte |
type
|
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. |
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(Class cl)
Convert runtime java.lang.Class to BCEL Type object. |
static Type |
getType(String signature)
Convert signature to a Type object. |
static Type[] |
getTypes(Class[] classes)
Convert runtime java.lang.Class[] to BCEL Type objects. |
int |
hashCode()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected byte type
protected String signature
public static final BasicType VOID
public static final BasicType BOOLEAN
public static final BasicType INT
public static final BasicType SHORT
public static final BasicType BYTE
public static final BasicType LONG
public static final BasicType DOUBLE
public static final BasicType FLOAT
public static final BasicType CHAR
public static final ObjectType OBJECT
public static final ObjectType CLASS
public static final ObjectType STRING
public static final ObjectType STRINGBUFFER
public static final ObjectType THROWABLE
public static final Type[] NO_ARGS
public static final ReferenceType NULL
public static final Type UNKNOWN
Constructor Detail |
---|
protected Type(byte t, String s)
Method Detail |
---|
public int hashCode()
hashCode
in class Object
public boolean equals(Object o)
equals
in class Object
public String getSignature()
public byte getType()
public int getSize()
public String toString()
toString
in class Object
public static String getMethodSignature(Type return_type, Type[] arg_types)
return_type
- what the method returnsarg_types
- what are the argument types
public static final Type getType(String signature) throws StringIndexOutOfBoundsException
signature
- signature string such as Ljava/lang/String;
StringIndexOutOfBoundsException
public static Type getReturnType(String signature)
signature
- signature string such as (Ljava/lang/String;)V
public static Type[] getArgumentTypes(String signature)
signature
- signature string such as (Ljava/lang/String;)V
public static Type getType(Class cl)
cl
- Java class
public static Type[] getTypes(Class[] classes)
classes
- an array of runtime class objects
public static String getSignature(Method meth)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |