Class TypeData
- java.lang.Object
-
- org.hotswap.agent.javassist.bytecode.stackmap.TypeData
-
- Direct Known Subclasses:
TypeData.AbsTypeVar,TypeData.BasicType,TypeData.ClassName
public abstract class TypeData extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTypeData.AbsTypeVarstatic classTypeData.ArrayElementstatic classTypeData.ArrayTypeprotected static classTypeData.BasicTypePrimitive types.static classTypeData.ClassNameType data for OBJECT.static classTypeData.NullTypeType data for NULL or OBJECT.static classTypeData.TypeVarstatic classTypeData.UninitDataType data for UNINIT.static classTypeData.UninitThisstatic classTypeData.UninitTypeVar
-
Constructor Summary
Constructors Modifier Constructor Description protectedTypeData()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static voidaastore(TypeData array, TypeData value, ClassPool cp)static CtClasscommonSuperClass(CtClass one, CtClass two)Finds the most specific common super class of the given classes.static CtClasscommonSuperClassEx(CtClass one, CtClass two)Finds the most specific common super class of the given classes by considering array types.voidconstructorCalled(int offset)intdfs(List<TypeData> order, int index, ClassPool cp)Depth-first search by Tarjan's algorithmabstract booleaneq(TypeData d)abstract TypeDatagetArrayType(int dim)abstract StringgetName()abstract intgetTypeData(ConstPool cp)abstract intgetTypeTag()abstract booleanis2WordType()abstract TypeData.BasicTypeisBasicType()If the type is a basic type, this method normalizes the type and returns a BasicType object.booleanisNullType()Returns false if getName() returns a valid type name.booleanisUninit()TypeDatajoin()static TypeData[]make(int size)abstract voidsetType(String s, ClassPool cp)StringtoString()protected TypeData.TypeVartoTypeVar(int dim)Returns this if it is a TypeVar or a TypeVar that this type depends on.
-
-
-
Method Detail
-
make
public static TypeData[] make(int size)
-
getTypeTag
public abstract int getTypeTag()
-
getTypeData
public abstract int getTypeData(ConstPool cp)
-
join
public TypeData join()
-
isBasicType
public abstract TypeData.BasicType isBasicType()
If the type is a basic type, this method normalizes the type and returns a BasicType object. Otherwise, it returns null.
-
is2WordType
public abstract boolean is2WordType()
-
isNullType
public boolean isNullType()
Returns false if getName() returns a valid type name.
-
isUninit
public boolean isUninit()
-
eq
public abstract boolean eq(TypeData d)
-
getName
public abstract String getName()
-
setType
public abstract void setType(String s, ClassPool cp) throws BadBytecode
- Throws:
BadBytecode
-
getArrayType
public abstract TypeData getArrayType(int dim) throws NotFoundException
- Parameters:
dim- array dimension. It may be negative.- Throws:
NotFoundException
-
dfs
public int dfs(List<TypeData> order, int index, ClassPool cp) throws NotFoundException
Depth-first search by Tarjan's algorithm- Parameters:
order- a node stack in the order in which nodes are visited.index- the index used by the algorithm.- Throws:
NotFoundException
-
toTypeVar
protected TypeData.TypeVar toTypeVar(int dim)
Returns this if it is a TypeVar or a TypeVar that this type depends on. Otherwise, this method returns null. It is used by dfs().- Parameters:
dim- dimension
-
constructorCalled
public void constructorCalled(int offset)
-
commonSuperClassEx
public static CtClass commonSuperClassEx(CtClass one, CtClass two) throws NotFoundException
Finds the most specific common super class of the given classes by considering array types.- Throws:
NotFoundException
-
commonSuperClass
public static CtClass commonSuperClass(CtClass one, CtClass two) throws NotFoundException
Finds the most specific common super class of the given classes. This method is a copy from javassist.bytecode.analysis.Type.- Throws:
NotFoundException
-
aastore
public static void aastore(TypeData array, TypeData value, ClassPool cp) throws BadBytecode
- Throws:
BadBytecode
-
-