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 int
dimension
protected java.lang.String
fixedType
private boolean
inList
private boolean
is2WordType
protected java.util.List<TypeData>
lowers
private int
smallest
protected java.util.List<java.lang.String>
uppers
protected java.util.List<TypeData>
usedBy
private int
visited
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
dfs(java.util.List<TypeData> preOrder, int index, ClassPool cp)
Depth-first search by Tarjan's algorithmprivate CtClass
fixByUppers(java.util.List<TypeData> users, ClassPool cp, java.util.Set<TypeData> visited, CtClass type)
private void
fixTypes(java.util.List<TypeData> scc, ClassPool cp)
private void
fixTypes1(java.util.List<TypeData> scc, TypeData kind)
private java.lang.String
fixTypes2(java.util.List<TypeData> scc, java.util.Set<java.lang.String> lowersSet, ClassPool cp)
TypeData
getArrayType(int dim)
java.lang.String
getName()
int
getTypeData(ConstPool cp)
int
getTypeTag()
boolean
is2WordType()
TypeData.BasicType
isBasicType()
If the type is a basic type, this method normalizes the type and returns a BasicType object.boolean
isNullType()
Returns false if getName() returns a valid type name.private static boolean
isObjectArray(CtClass cc)
boolean
isUninit()
void
merge(TypeData t)
void
setType(java.lang.String typeName, ClassPool cp)
(package private) java.lang.String
toString2(java.util.Set<TypeData> hash)
protected TypeData.TypeVar
toTypeVar(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.List<TypeData> lowers
-
usedBy
protected java.util.List<TypeData> usedBy
-
uppers
protected java.util.List<java.lang.String> 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:TypeData
If the type is a basic type, this method normalizes the type and returns a BasicType object. Otherwise, it returns null.- Specified by:
isBasicType
in classTypeData
-
is2WordType
public boolean is2WordType()
- Specified by:
is2WordType
in classTypeData
-
isNullType
public boolean isNullType()
Description copied from class:TypeData
Returns false if getName() returns a valid type name.- Overrides:
isNullType
in classTypeData
-
merge
public void merge(TypeData t)
- Specified by:
merge
in classTypeData.AbsTypeVar
-
getTypeTag
public int getTypeTag()
- Overrides:
getTypeTag
in classTypeData.AbsTypeVar
-
getTypeData
public int getTypeData(ConstPool cp)
- Overrides:
getTypeData
in classTypeData.AbsTypeVar
-
setType
public void setType(java.lang.String typeName, ClassPool cp) throws BadBytecode
- Specified by:
setType
in classTypeData
- Throws:
BadBytecode
-
toTypeVar
protected TypeData.TypeVar toTypeVar(int dim)
Description copied from class:TypeData
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().
-
getArrayType
public TypeData getArrayType(int dim) throws NotFoundException
- Specified by:
getArrayType
in classTypeData
- Parameters:
dim
- array dimension. It may be negative.- Throws:
NotFoundException
-
dfs
public int dfs(java.util.List<TypeData> preOrder, int index, ClassPool cp) throws NotFoundException
Description copied from class:TypeData
Depth-first search by Tarjan's algorithm- Overrides:
dfs
in 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.List<TypeData> scc, ClassPool cp) throws NotFoundException
- Throws:
NotFoundException
-
fixTypes1
private void fixTypes1(java.util.List<TypeData> scc, TypeData kind) throws NotFoundException
- Throws:
NotFoundException
-
fixTypes2
private java.lang.String fixTypes2(java.util.List<TypeData> scc, java.util.Set<java.lang.String> lowersSet, ClassPool cp) throws NotFoundException
- Throws:
NotFoundException
-
isObjectArray
private static boolean isObjectArray(CtClass cc) throws NotFoundException
- Throws:
NotFoundException
-
fixByUppers
private CtClass fixByUppers(java.util.List<TypeData> users, ClassPool cp, java.util.Set<TypeData> visited, CtClass type) throws NotFoundException
- Throws:
NotFoundException
-
-