TypeData.AbsTypeVar
, TypeData.BasicType
, TypeData.ClassName
public abstract class TypeData extends Object
Modifier and Type | Class | Description |
---|---|---|
static class |
TypeData.AbsTypeVar |
|
static class |
TypeData.ArrayElement |
|
static class |
TypeData.ArrayType |
|
protected static class |
TypeData.BasicType |
Primitive types.
|
static class |
TypeData.ClassName |
Type data for OBJECT.
|
static class |
TypeData.NullType |
Type data for NULL or OBJECT.
|
static class |
TypeData.TypeVar |
|
static class |
TypeData.UninitData |
Type data for UNINIT.
|
static class |
TypeData.UninitThis |
|
static class |
TypeData.UninitTypeVar |
Modifier | Constructor | Description |
---|---|---|
protected |
TypeData() |
Modifier and Type | Method | Description |
---|---|---|
static void |
aastore(TypeData array,
TypeData value,
ClassPool cp) |
|
static CtClass |
commonSuperClass(CtClass one,
CtClass two) |
Finds the most specific common super class of the given classes.
|
static CtClass |
commonSuperClassEx(CtClass one,
CtClass two) |
Finds the most specific common super class of the given classes
by considering array types.
|
void |
constructorCalled(int offset) |
|
int |
dfs(ArrayList order,
int index,
ClassPool cp) |
Depth-first search by Tarjan's algorithm
|
abstract boolean |
eq(TypeData d) |
|
abstract TypeData |
getArrayType(int dim) |
|
abstract String |
getName() |
|
abstract int |
getTypeData(ConstPool cp) |
|
abstract int |
getTypeTag() |
|
abstract boolean |
is2WordType() |
|
abstract 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.
|
boolean |
isUninit() |
|
TypeData |
join() |
|
static TypeData[] |
make(int size) |
|
abstract void |
setType(String s,
ClassPool cp) |
|
String |
toString() |
|
protected TypeData.TypeVar |
toTypeVar(int dim) |
Returns this if it is a TypeVar or a TypeVar that this
type depends on.
|
public static TypeData[] make(int size)
public abstract int getTypeTag()
public abstract int getTypeData(ConstPool cp)
public TypeData join()
public abstract TypeData.BasicType isBasicType()
public abstract boolean is2WordType()
public boolean isNullType()
public boolean isUninit()
public abstract boolean eq(TypeData d)
public abstract String getName()
public abstract void setType(String s, ClassPool cp) throws BadBytecode
BadBytecode
public abstract TypeData getArrayType(int dim) throws NotFoundException
dim
- array dimension. It may be negative.NotFoundException
public int dfs(ArrayList order, int index, ClassPool cp) throws NotFoundException
order
- a node stack in the order in which nodes are visited.index
- the index used by the algorithm.NotFoundException
protected TypeData.TypeVar toTypeVar(int dim)
dim
- dimensionpublic void constructorCalled(int offset)
public static CtClass commonSuperClassEx(CtClass one, CtClass two) throws NotFoundException
NotFoundException
public static CtClass commonSuperClass(CtClass one, CtClass two) throws NotFoundException
NotFoundException
public static void aastore(TypeData array, TypeData value, ClassPool cp) throws BadBytecode
BadBytecode
Copyright © 2018 Shigeru Chiba, www.javassist.org. All rights reserved.