Class FindArgumentAssertions

  • All Implemented Interfaces:
    Detector, Priorities, org.apache.bcel.classfile.Visitor

    public class FindArgumentAssertions
    extends AbstractAssertDetector
    This detector can find Assertions that try to validate method arguments.
    • Constructor Detail

      • FindArgumentAssertions

        public FindArgumentAssertions​(BugReporter bugReporter)
    • Method Detail

      • isInitialArg

        private boolean isInitialArg()
        Checks if the methods parameter is an initial arg.
      • isMethodCall

        private boolean isMethodCall​(int seen)
        Returns true if the opcode is a method invocation false otherwise
      • checkSeen

        private int checkSeen​(int seen)
        Returns the number of arguments that is popped from the stack for the given opcode
      • detect

        protected void detect​(int seen)
        Finds MET01 rule violating assertions.
        Specified by:
        detect in class AbstractAssertDetector