Class Pass3bVerifier
- java.lang.Object
-
- org.apache.bcel.verifier.PassVerifier
-
- org.apache.bcel.verifier.structurals.Pass3bVerifier
-
public final class Pass3bVerifier extends PassVerifier
This PassVerifier verifies a method of class file according to pass 3, so-called structural verification 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:
do_verify()
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
Pass3bVerifier.InstructionContextQueue
An InstructionContextQueue is a utility class that holds (InstructionContext, ArrayList) pairs in a Queue data structure.
-
Constructor Summary
Constructors Constructor Description Pass3bVerifier(Verifier myOwner, int methodNo)
This class should only be instantiated by a Verifier.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
circulationPump(MethodGen m, ControlFlowGraph cfg, InstructionContext start, Frame vanillaFrame, InstConstraintVisitor icv, ExecutionVisitor ev)
Whenever the outgoing frame situation of an InstructionContext changes, all its successors are put [back] into the queue [as if they were unvisited].VerificationResult
do_verify()
Pass 3b implements the data flow analysis as described in the Java Virtual Machine Specification, Second Edition.int
getMethodNo()
Returns the method number as supplied when instantiating.void
invalidReturnTypeError(Type returnedType, MethodGen m)
Throws an exception indicating the returned type is not compatible with the return type of the given method.-
Methods inherited from class org.apache.bcel.verifier.PassVerifier
addMessage, getMessages, getMessagesList, verify
-
-
-
-
Field Detail
-
DEBUG
private static final boolean DEBUG
In DEBUG mode, the verification algorithm is not randomized.- See Also:
- Constant Field Values
-
myOwner
private final Verifier myOwner
The Verifier that created this.
-
methodNo
private final int methodNo
The method number to verify.
-
-
Method Detail
-
circulationPump
private void circulationPump(MethodGen m, ControlFlowGraph cfg, InstructionContext start, Frame vanillaFrame, InstConstraintVisitor icv, ExecutionVisitor ev)
Whenever the outgoing frame situation of an InstructionContext changes, all its successors are put [back] into the queue [as if they were unvisited]. The proof of termination is about the existence of a fix point of frame merging.
-
do_verify
public VerificationResult do_verify()
Pass 3b implements the data flow analysis as described in the Java Virtual Machine Specification, Second Edition. Later versions will use LocalVariablesInfo objects to verify if the verifier-inferred types and the class file's debug information (LocalVariables attributes) match [TODO].- Specified by:
do_verify
in classPassVerifier
- Returns:
- The VerificationResult
- See Also:
LocalVariablesInfo
,Pass2Verifier.getLocalVariablesInfo(int)
-
getMethodNo
public int getMethodNo()
Returns the method number as supplied when instantiating.
-
invalidReturnTypeError
public void invalidReturnTypeError(Type returnedType, MethodGen m)
Throws an exception indicating the returned type is not compatible with the return type of the given method.- Parameters:
returnedType
- the type of the returned expressionm
- the method we are processing- Throws:
StructuralCodeConstraintException
- always- Since:
- 6.0
-
-