|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.asm.tree.analysis.Interpreter<BasicValue>
org.objectweb.asm.tree.analysis.BasicInterpreter
org.objectweb.asm.tree.analysis.BasicVerifier
org.objectweb.asm.tree.analysis.SimpleVerifier
public class SimpleVerifier
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
).
Field Summary |
---|
Fields inherited from class org.objectweb.asm.tree.analysis.Interpreter |
---|
api |
Constructor Summary | |
---|---|
|
SimpleVerifier()
Constructs a new SimpleVerifier . |
protected |
SimpleVerifier(int api,
Type currentClass,
Type currentSuperClass,
List<Type> currentClassInterfaces,
boolean isInterface)
|
|
SimpleVerifier(Type currentClass,
Type currentSuperClass,
boolean isInterface)
Constructs a new SimpleVerifier to verify a specific class. |
|
SimpleVerifier(Type currentClass,
Type currentSuperClass,
List<Type> currentClassInterfaces,
boolean isInterface)
Constructs a new SimpleVerifier to verify a specific class. |
Method Summary | |
---|---|
protected Class<?> |
getClass(Type t)
|
protected BasicValue |
getElementValue(BasicValue objectArrayValue)
|
protected Type |
getSuperClass(Type t)
|
protected boolean |
isArrayValue(BasicValue value)
|
protected boolean |
isAssignableFrom(Type t,
Type u)
|
protected boolean |
isInterface(Type t)
|
protected boolean |
isSubTypeOf(BasicValue value,
BasicValue expected)
|
BasicValue |
merge(BasicValue v,
BasicValue w)
Merges two values. |
BasicValue |
newValue(Type type)
Creates a new value that represents the given type. |
void |
setClassLoader(ClassLoader loader)
Set the ClassLoader which will be used to load referenced
classes. |
Methods inherited from class org.objectweb.asm.tree.analysis.BasicVerifier |
---|
binaryOperation, copyOperation, naryOperation, returnOperation, ternaryOperation, unaryOperation |
Methods inherited from class org.objectweb.asm.tree.analysis.BasicInterpreter |
---|
newOperation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleVerifier()
SimpleVerifier
.
public SimpleVerifier(Type currentClass, Type currentSuperClass, boolean isInterface)
SimpleVerifier
to verify a specific class. This
class will not be loaded into the JVM since it may be incorrect.
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.public SimpleVerifier(Type currentClass, Type currentSuperClass, List<Type> currentClassInterfaces, boolean isInterface)
SimpleVerifier
to verify a specific class. This
class will not be loaded into the JVM since it may be incorrect.
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.protected SimpleVerifier(int api, Type currentClass, Type currentSuperClass, List<Type> currentClassInterfaces, boolean isInterface)
Method Detail |
---|
public void setClassLoader(ClassLoader loader)
ClassLoader
which will be used to load referenced
classes. This is useful if you are verifying multiple interdependent
classes.
loader
- a ClassLoader
to usepublic BasicValue newValue(Type type)
Interpreter
this
), exception
handler variable and with null
type for variables reserved
by long and double types.
newValue
in class BasicInterpreter
type
- a primitive or reference type, or null to represent
an uninitialized value.
protected boolean isArrayValue(BasicValue value)
isArrayValue
in class BasicVerifier
protected BasicValue getElementValue(BasicValue objectArrayValue) throws AnalyzerException
getElementValue
in class BasicVerifier
AnalyzerException
protected boolean isSubTypeOf(BasicValue value, BasicValue expected)
isSubTypeOf
in class BasicVerifier
public BasicValue merge(BasicValue v, BasicValue w)
Interpreter
merge
in class BasicInterpreter
v
- a value.w
- another value.
protected boolean isInterface(Type t)
protected Type getSuperClass(Type t)
protected boolean isAssignableFrom(Type t, Type u)
protected Class<?> getClass(Type t)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |