Class 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.

    The system property org.apache.bcel.verifier.maxFrameSlots bounds the size of the pass 3b data flow analysis, measured in frame slots: (max_locals + max_stack) * instruction count of the method under verification. Methods above the bound are rejected instead of analyzed. The default is 100,000,000; a value of zero or less disables the bound.

    See Also:
    do_verify()
    • Constructor Detail

      • Pass3bVerifier

        public Pass3bVerifier​(Verifier myOwner,
                              int methodNo)
        This class should only be instantiated by a Verifier.
        Parameters:
        myOwner - The verifier that owns this Pass3bVerifier.
        methodNo - The method number.
        See Also:
        Verifier
    • Method Detail

      • getMethodNo

        public int getMethodNo()
        Returns the method number as supplied when instantiating.
        Returns:
        The method number.
      • 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 expression.
        m - The method we are processing.
        Throws:
        StructuralCodeConstraintException - Always thrown.
        Since:
        6.0