Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.objectweb.asm.tree.analysis.BasicInterpreter
org.objectweb.asm.tree.analysis.BasicVerifier
org.objectweb.asm.tree.analysis.SimpleVerifier
public class SimpleVerifier
extends BasicVerifier
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
).
Constructor Summary | |
| |
| |
|
Method Summary | |
protected Class | |
protected Value |
|
protected Type | |
protected boolean |
|
protected boolean |
|
protected boolean |
|
protected boolean |
|
Value | |
Value |
Methods inherited from class org.objectweb.asm.tree.analysis.BasicVerifier | |
binaryOperation , copyOperation , getElementValue , isArrayValue , isSubTypeOf , naryOperation , ternaryOperation , unaryOperation |
Methods inherited from class org.objectweb.asm.tree.analysis.BasicInterpreter | |
binaryOperation , copyOperation , merge , naryOperation , newOperation , newValue , ternaryOperation , unaryOperation |
public SimpleVerifier(Type currentClass, Type currentSuperClass, List currentClassInterfaces, boolean isInterface)
Constructs a newSimpleVerifier
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.
public SimpleVerifier(Type currentClass, Type currentSuperClass, boolean isInterface)
Constructs a newSimpleVerifier
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.
protected Value getElementValue(Value objectArrayValue) throws AnalyzerException
- Overrides:
- getElementValue in interface BasicVerifier
protected boolean isArrayValue(Value value)
- Overrides:
- isArrayValue in interface BasicVerifier
protected boolean isSubTypeOf(Value value, Value expected)
- Overrides:
- isSubTypeOf in interface BasicVerifier
public Value merge(Value v, Value w)
Merges two values. The merge operation must return a value that represents both values (for instance, if the two values are two types, the merged value must be a common super type of the two types. If the two values are integer intervals, the merged value must be an interval that contains the previous ones. Likewise for other types of values).
- Specified by:
- merge in interface Interpreter
- Overrides:
- merge in interface BasicInterpreter
- Parameters:
v
- a value.w
- another value.
- Returns:
- the merged value. If the merged value is equal to v, this method must return v.
public Value newValue(Type type)
Creates a new value that represents the given type. Called for method parameters (includingthis
), exception handler variable and withnull
type for variables reserved by long and double types.
- Specified by:
- newValue in interface Interpreter
- Overrides:
- newValue in interface BasicInterpreter
- Parameters:
type
- a primitive or reference type, or null to represent an uninitialized value.
- Returns:
- a value that represents the given type. The size of the returned value must be equal to the size of the given type.