Package javassist.bytecode.stackmap
Class TypeData.TypeVar
- java.lang.Object
-
- javassist.bytecode.stackmap.TypeData
-
- javassist.bytecode.stackmap.TypeData.AbsTypeVar
-
- javassist.bytecode.stackmap.TypeData.TypeVar
-
- Enclosing class:
- TypeData
public static class TypeData.TypeVar extends TypeData.AbsTypeVar
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javassist.bytecode.stackmap.TypeData
TypeData.AbsTypeVar, TypeData.ArrayElement, TypeData.ArrayType, TypeData.BasicType, TypeData.ClassName, TypeData.NullType, TypeData.TypeVar, TypeData.UninitData, TypeData.UninitThis, TypeData.UninitTypeVar
-
-
Field Summary
Fields Modifier and Type Field Description private intdimensionprotected java.lang.StringfixedTypeprivate booleaninListprivate booleanis2WordTypeprotected java.util.ArrayListlowersprivate intsmallestprotected java.util.ArrayListuppersprotected java.util.ArrayListusedByprivate intvisited
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intdfs(java.util.ArrayList preOrder, int index, ClassPool cp)Depth-first search by Tarjan's algorithmprivate CtClassfixByUppers(java.util.ArrayList users, ClassPool cp, java.util.HashSet visited, CtClass type)private voidfixTypes(java.util.ArrayList scc, ClassPool cp)private voidfixTypes1(java.util.ArrayList scc, TypeData kind)private java.lang.StringfixTypes2(java.util.ArrayList scc, java.util.HashSet lowersSet, ClassPool cp)TypeDatagetArrayType(int dim)java.lang.StringgetName()intgetTypeData(ConstPool cp)intgetTypeTag()booleanis2WordType()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.private static booleanisObjectArray(CtClass cc)booleanisUninit()voidmerge(TypeData t)voidsetType(java.lang.String typeName, ClassPool cp)(package private) java.lang.StringtoString2(java.util.HashSet hash)protected TypeData.TypeVartoTypeVar(int dim)Returns this if it is a TypeVar or a TypeVar that this type depends on.-
Methods inherited from class javassist.bytecode.stackmap.TypeData.AbsTypeVar
eq
-
Methods inherited from class javassist.bytecode.stackmap.TypeData
aastore, commonSuperClass, commonSuperClassEx, constructorCalled, eq, join, make, toString
-
-
-
-
Field Detail
-
lowers
protected java.util.ArrayList lowers
-
usedBy
protected java.util.ArrayList usedBy
-
uppers
protected java.util.ArrayList uppers
-
fixedType
protected java.lang.String fixedType
-
is2WordType
private boolean is2WordType
-
visited
private int visited
-
smallest
private int smallest
-
inList
private boolean inList
-
dimension
private int dimension
-
-
Constructor Detail
-
TypeVar
public TypeVar(TypeData t)
-
-
Method Detail
-
isBasicType
public TypeData.BasicType isBasicType()
Description copied from class:TypeDataIf the type is a basic type, this method normalizes the type and returns a BasicType object. Otherwise, it returns null.- Specified by:
isBasicTypein classTypeData
-
is2WordType
public boolean is2WordType()
- Specified by:
is2WordTypein classTypeData
-
isNullType
public boolean isNullType()
Description copied from class:TypeDataReturns false if getName() returns a valid type name.- Overrides:
isNullTypein classTypeData
-
merge
public void merge(TypeData t)
- Specified by:
mergein classTypeData.AbsTypeVar
-
getTypeTag
public int getTypeTag()
- Overrides:
getTypeTagin classTypeData.AbsTypeVar
-
getTypeData
public int getTypeData(ConstPool cp)
- Overrides:
getTypeDatain classTypeData.AbsTypeVar
-
setType
public void setType(java.lang.String typeName, ClassPool cp) throws BadBytecode- Specified by:
setTypein classTypeData- Throws:
BadBytecode
-
toTypeVar
protected TypeData.TypeVar toTypeVar(int dim)
Description copied from class:TypeDataReturns this if it is a TypeVar or a TypeVar that this type depends on. Otherwise, this method returns null. It is used by dfs().
-
getArrayType
public TypeData getArrayType(int dim) throws NotFoundException
- Specified by:
getArrayTypein classTypeData- Parameters:
dim- array dimension. It may be negative.- Throws:
NotFoundException
-
dfs
public int dfs(java.util.ArrayList preOrder, int index, ClassPool cp) throws NotFoundExceptionDescription copied from class:TypeDataDepth-first search by Tarjan's algorithm- Overrides:
dfsin classTypeData- Parameters:
preOrder- a node stack in the order in which nodes are visited.index- the index used by the algorithm.- Throws:
NotFoundException
-
fixTypes
private void fixTypes(java.util.ArrayList scc, ClassPool cp) throws NotFoundException- Throws:
NotFoundException
-
fixTypes1
private void fixTypes1(java.util.ArrayList scc, TypeData kind) throws NotFoundException- Throws:
NotFoundException
-
fixTypes2
private java.lang.String fixTypes2(java.util.ArrayList scc, java.util.HashSet lowersSet, ClassPool cp) throws NotFoundException- Throws:
NotFoundException
-
isObjectArray
private static boolean isObjectArray(CtClass cc) throws NotFoundException
- Throws:
NotFoundException
-
fixByUppers
private CtClass fixByUppers(java.util.ArrayList users, ClassPool cp, java.util.HashSet visited, CtClass type) throws NotFoundException
- Throws:
NotFoundException
-
-