org.apache.bcel.verifier.statics
public final class Pass3aVerifier extends PassVerifier
do_verify()
Modifier and Type | Class and Description |
---|---|
private class |
Pass3aVerifier.InstOperandConstraintVisitor
This visitor class does the actual checking for the instruction
operand's constraints.
|
Modifier and Type | Field and Description |
---|---|
(package private) Code |
code
The one and only Code object used by an instance of this class.
|
(package private) InstructionList |
instructionList
The one and only InstructionList object used by an instance of this class.
|
private int |
method_no
The method number to verify.
|
private Verifier |
myOwner
The Verifier that created this.
|
Constructor and Description |
---|
Pass3aVerifier(Verifier owner,
int method_no)
Should only be instantiated by a Verifier.
|
Modifier and Type | Method and Description |
---|---|
private static boolean |
contains(int[] ints,
int i)
A small utility method returning if a given int i is in the given int[] ints.
|
private void |
delayedPass2Checks()
These are the checks that could be done in pass 2 but are delayed to pass 3
for performance reasons.
|
VerificationResult |
do_verify()
Pass 3a is the verification of static constraints of
JVM code (such as legal targets of branch instructions).
|
int |
getMethodNo()
Returns the method number as supplied when instantiating.
|
private void |
pass3StaticInstructionChecks()
These are the checks if constraints are satisfied which are described in the
Java Virtual Machine Specification, Second Edition as Static Constraints on
the instructions of Java Virtual Machine Code (chapter 4.8.1).
|
private void |
pass3StaticInstructionOperandsChecks()
These are the checks for the satisfaction of constraints which are described in the
Java Virtual Machine Specification, Second Edition as Static Constraints on
the operands of instructions of Java Virtual Machine Code (chapter 4.8.1).
|
addMessage, getMessages, verify
private Verifier myOwner
private int method_no
InstructionList instructionList
Code code
public Pass3aVerifier(Verifier owner, int method_no)
public VerificationResult do_verify()
do_verify
in class PassVerifier
InvalidMethodException
- if the method to verify does not exist.private void delayedPass2Checks()
ClassConstraintException
- if the verification fails.do_verify()
private void pass3StaticInstructionChecks()
StaticCodeConstraintException
- if the verification fails.private void pass3StaticInstructionOperandsChecks()
StaticCodeConstraintException
- if the verification fails.private static boolean contains(int[] ints, int i)
public int getMethodNo()