Package org.apache.bcel.verifier.statics
Class Pass3aVerifier
java.lang.Object
org.apache.bcel.verifier.PassVerifier
org.apache.bcel.verifier.statics.Pass3aVerifier
This PassVerifier verifies a class file according to pass 3, static part as described in The Java Virtual Machine
Specification, 2nd edition. More detailed information is to be found at the do_verify() method's documentation.
- See Also:
-
Constructor Summary
ConstructorDescriptionPass3aVerifier
(Verifier verifier, int methodNo) Should only be instantiated by a Verifier. -
Method Summary
Modifier and TypeMethodDescriptionPass 3a is the verification of static constraints of JVM code (such as legal targets of branch instructions).int
Returns the method number as supplied when instantiating.protected String
This method is a slightly modified version of verifier.statics.StringRepresentation.toString(final Node obj) that accepts any Object, not just a Node.Methods inherited from class org.apache.bcel.verifier.PassVerifier
addMessage, getMessages, getMessagesList, verify
-
Constructor Details
-
Pass3aVerifier
Should only be instantiated by a Verifier.
-
-
Method Details
-
do_verify
Pass 3a is the verification of static constraints of JVM code (such as legal targets of branch instructions). This is the part of pass 3 where you do not need data flow analysis. JustIce also delays the checks for a correct exception table of a Code attribute and correct line number entries in a LineNumberTable attribute of a Code attribute (which conceptually belong to pass 2) to this pass. Also, most of the check for valid local variable entries in a LocalVariableTable attribute of a Code attribute is delayed until this pass. All these checks need access to the code array of the Code attribute.- Specified by:
do_verify
in classPassVerifier
- Returns:
- The VerificationResult
- Throws:
InvalidMethodException
- if the method to verify does not exist.
-
getMethodNo
Returns the method number as supplied when instantiating. -
tostring
This method is a slightly modified version of verifier.statics.StringRepresentation.toString(final Node obj) that accepts any Object, not just a Node. Returns the String representation of the Object obj; this is obj.toString() if it does not throw any RuntimeException, or else it is a string derived only from obj's class name.
-