BasicVerifier that performs more precise verifications. This verifier
computes exact class types, instead of using a single "object reference" type (as done in BasicVerifier).
| Modifier and Type | Field and Description |
|---|---|
| private final Type | currentClass
The type of the class that is verified. |
| private final List | currentClassInterfaces
The types of the interfaces directly implemented by the class that is verified. |
| private final Type | currentSuperClass
The type of the super class of the class that is verified. |
| private final boolean | isInterface
Whether the class that is verified is an interface. |
| private ClassLoader | loader
The loader to use to load the referenced classes. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | SimpleVerifier(final Type
the type of the class to be verified. currentClass, final Type the type of the super class of the class to be verified. currentSuperClass, final boolean whether the class to be verifier is an interface. isInterface)Constructs a new |
| public | SimpleVerifier(final Type
the type of the class to be verified. currentClass, final Type the type of the super class of the class to be verified. currentSuperClass, final List<Type> the types of the interfaces directly implemented by the class to
be verified. currentClassInterfaces, final boolean whether the class to be verifier is an interface. isInterface)Constructs a new |
| protected | SimpleVerifier(final int
the ASM API version supported by this verifier. Must be one of the api, final Type ASMx values in Opcodes.the type of the class to be verified. currentClass, final Type the type of the super class of the class to be verified. currentSuperClass, final List<Type> the types of the interfaces directly implemented by the class to
be verified. currentClassInterfaces, final boolean whether the class to be verifier is an interface. isInterface)Constructs a new |
| Modifier and Type | Method and Description |
|---|---|
| protected Class | |
| protected BasicValue | getElementValue(final BasicValue
a value corresponding to array of object (or array) references. objectArrayValue)Overrides org. |
| protected Type | Returns: the type corresponding to the super class of 'type'.a type. type)Returns the type corresponding to the super class of the given type. |
| protected boolean | isArrayValue(final BasicValue
a value. value)Overrides org. |
| protected boolean | Returns: whether the class corresponding to 'type1' is either the same as, or is a superclass or superinterface of the class corresponding to 'type2'.a type. type1, final Type another type. type2)Returns whether the class corresponding to the first argument is either the same as, or is a superclass or superinterface of the class corresponding to the second argument. |
| protected boolean | Returns: whether 'type' corresponds to an interface.a type. type)Returns whether the given type corresponds to the type of an interface. |
| protected boolean | isSubTypeOf(final BasicValue
a value. value, final BasicValue another value. expected)Overrides org. |
| public BasicValue | merge(final BasicValue
a value. value1, final BasicValue another value. value2)Overrides org. |
| private BasicValue | |
| public BasicValue | newValue(final Type
a primitive or reference type, or null to represent an uninitialized
value. type)Overrides org. |
| public void | setClassLoader(final ClassLoader
the loader)ClassLoader to use.Sets the |
| currentClass | back to summary |
|---|---|
| private final Type currentClass The type of the class that is verified. | |
| currentClassInterfaces | back to summary |
|---|---|
| private final List<Type> currentClassInterfaces The types of the interfaces directly implemented by the class that is verified. | |
| currentSuperClass | back to summary |
|---|---|
| private final Type currentSuperClass The type of the super class of the class that is verified. | |
| isInterface | back to summary |
|---|---|
| private final boolean isInterface Whether the class that is verified is an interface. | |
| loader | back to summary |
|---|---|
| private ClassLoader loader The loader to use to load the referenced classes. | |
| SimpleVerifier | back to summary |
|---|---|
| public SimpleVerifier() Constructs a new | |
| SimpleVerifier | back to summary |
|---|---|
| public SimpleVerifier(final Type currentClass, final Type currentSuperClass, final boolean isInterface) Constructs a new | |
| SimpleVerifier | back to summary |
|---|---|
| public SimpleVerifier(final Type currentClass, final Type currentSuperClass, final List<Type> currentClassInterfaces, final boolean isInterface) Constructs a new
| |
| SimpleVerifier | back to summary |
|---|---|
| protected SimpleVerifier(final int api, final Type currentClass, final Type currentSuperClass, final List<Type> currentClassInterfaces, final boolean isInterface) Constructs a new
| |
| getClass | back to summary |
|---|---|
| protected Class Loads the class corresponding to the given type. The class is loaded with the class loader
specified with | |
| getElementValue | back to summary |
|---|---|
| protected BasicValue getElementValue(final BasicValue objectArrayValue) throws AnalyzerException Overrides org. Doc from org. Returns the value corresponding to the type of the elements of the given array reference value.
| |
| getSuperClass | back to summary |
|---|---|
| protected Type getSuperClass(final Type type) Returns the type corresponding to the super class of the given type. The default implementation of this method loads the class and uses the reflection API to return its result (unless the given type corresponds to the class being verified). | |
| isArrayValue | back to summary |
|---|---|
| protected boolean isArrayValue(final BasicValue value) Overrides org. Doc from org. Returns whether the given value corresponds to an array reference.
| |
| isAssignableFrom | back to summary |
|---|---|
| protected boolean isAssignableFrom(final Type type1, final Type type2) Returns whether the class corresponding to the first argument is either the same as, or is a superclass or superinterface of the class corresponding to the second argument. The default implementation of this method loads the classes and uses the reflection API to return its result (unless the result can be computed from the class being verified, and the types of its super classes and implemented interfaces). | |
| isInterface | back to summary |
|---|---|
| protected boolean isInterface(final Type type) Returns whether the given type corresponds to the type of an interface. The default implementation of this method loads the class and uses the reflection API to return its result (unless the given type corresponds to the class being verified).
| |
| isSubTypeOf | back to summary |
|---|---|
| protected boolean isSubTypeOf(final BasicValue value, final BasicValue expected) Overrides org. Doc from org. Returns whether the type corresponding to the first argument is a subtype of the type corresponding to the second argument.
| |
| merge | back to summary |
|---|---|
| public BasicValue merge(final BasicValue value1, final BasicValue value2) Overrides org. Doc from org. 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).
| |
| newArrayValue | back to summary |
|---|---|
| private BasicValue newArrayValue(final Type type, final int dimensions) | |
| newValue | back to summary |
|---|---|
| public BasicValue newValue(final Type type) Overrides org. Doc from org. Creates a new value that represents the given type. Called for method parameters (including An interpreter may choose to implement one or more of
| |
| setClassLoader | back to summary |
|---|---|
| public void setClassLoader(final ClassLoader loader) Sets the
| |