org.objectweb.asm.tree.analysis

Class SimpleVerifier

public class SimpleVerifier extends BasicVerifier

An extended BasicVerifier that performs more precise verifications. This verifier computes exact class types, instead of using a single "object reference" type (as done in the BasicVerifier).

Author: Eric Bruneton Bing Ran

Constructor Summary
SimpleVerifier()
Constructs a new SimpleVerifier.
SimpleVerifier(Type currentClass, Type currentSuperClass, boolean isInterface)
Constructs a new SimpleVerifier to verify a specific class.
SimpleVerifier(Type currentClass, Type currentSuperClass, List currentClassInterfaces, boolean isInterface)
Constructs a new SimpleVerifier to verify a specific class.
Method Summary
protected ClassgetClass(Type t)
protected ValuegetElementValue(Value objectArrayValue)
protected TypegetSuperClass(Type t)
protected booleanisArrayValue(Value value)
protected booleanisAssignableFrom(Type t, Type u)
protected booleanisInterface(Type t)
protected booleanisSubTypeOf(Value value, Value expected)
Valuemerge(Value v, Value w)
ValuenewValue(Type type)
voidsetClassLoader(ClassLoader loader)
Set the ClassLoader which will be used to load referenced classes.

Constructor Detail

SimpleVerifier

public SimpleVerifier()
Constructs a new SimpleVerifier.

SimpleVerifier

public SimpleVerifier(Type currentClass, Type currentSuperClass, boolean isInterface)
Constructs a new SimpleVerifier to verify a specific class. This class will not be loaded into the JVM since it may be incorrect.

Parameters: currentClass the class that is verified. currentSuperClass the super class of the class that is verified. isInterface if the class that is verified is an interface.

SimpleVerifier

public SimpleVerifier(Type currentClass, Type currentSuperClass, List currentClassInterfaces, boolean isInterface)
Constructs a new SimpleVerifier to verify a specific class. This class will not be loaded into the JVM since it may be incorrect.

Parameters: currentClass the class that is verified. currentSuperClass the super class of the class that is verified. currentClassInterfaces the interfaces implemented by the class that is verified. isInterface if the class that is verified is an interface.

Method Detail

getClass

protected Class getClass(Type t)

getElementValue

protected Value getElementValue(Value objectArrayValue)

getSuperClass

protected Type getSuperClass(Type t)

isArrayValue

protected boolean isArrayValue(Value value)

isAssignableFrom

protected boolean isAssignableFrom(Type t, Type u)

isInterface

protected boolean isInterface(Type t)

isSubTypeOf

protected boolean isSubTypeOf(Value value, Value expected)

merge

public Value merge(Value v, Value w)

newValue

public Value newValue(Type type)

setClassLoader

public void setClassLoader(ClassLoader loader)
Set the ClassLoader which will be used to load referenced classes. This is useful if you are verifying multiple interdependent classes.

Parameters: loader a ClassLoader to use