Class WrongMapIterator

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

public class WrongMapIterator extends BytecodeScanningDetector implements StatelessDetector
  • Field Details

  • Constructor Details

    • WrongMapIterator

      public WrongMapIterator(BugReporter bugReporter)
  • Method Details

    • visitClassContext

      public void visitClassContext(ClassContext classContext)
      Description copied from interface: Detector
      Visit the ClassContext for a class which should be analyzed for instances of bug patterns.
      Specified by:
      visitClassContext in interface Detector
      Overrides:
      visitClassContext in class BytecodeScanningDetector
      Parameters:
      classContext - the ClassContext
    • visit

      public void visit(org.apache.bcel.classfile.Method obj)
      Overrides:
      visit in class BetterVisitor
    • reset

      private void reset()
    • visit

      public void visit(org.apache.bcel.classfile.Code code)
      Overrides:
      visit in class DismantleBytecode
    • implementsMap

      private static boolean implementsMap(ClassDescriptor d)
      Determine from the class descriptor for a variable whether that variable implements java.util.Map.
      Parameters:
      d - class descriptor for variable we want to check implements Map
      Returns:
      true iff the descriptor corresponds to an implementor of Map
    • handleStore

      private int handleStore(int storeRegister, int current)
    • handleStore

      private void handleStore(int register)
    • removedFromStack

      private void removedFromStack(boolean includeKey)
    • sawOpcode

      public void sawOpcode(int seen)
      Overrides:
      sawOpcode in class DismantleBytecode