Class DismantleBytecode

All Implemented Interfaces:
org.apache.bcel.classfile.Visitor
Direct Known Subclasses:
BytecodeScanningDetector, CloneIdiom, NoteDirectlyRelevantTypeQualifiers

public abstract class DismantleBytecode extends AnnotationVisitor
  • Field Details

  • Constructor Details

    • DismantleBytecode

      public DismantleBytecode()
  • Method Details

    • getClassDescriptorOperand

      public ClassDescriptor getClassDescriptorOperand()
    • getXClassOperand

      @CheckForNull public XClass getXClassOperand()
    • isMethodCall

      public boolean isMethodCall()
    • getMethodDescriptorOperand

      public MethodDescriptor getMethodDescriptorOperand()
    • getXMethodOperand

      @CheckForNull public XMethod getXMethodOperand()
    • getFieldDescriptorOperand

      public FieldDescriptor getFieldDescriptorOperand()
    • getXFieldOperand

      @CheckForNull public XField getXFieldOperand()
    • getDottedClassConstantOperand

      public String getDottedClassConstantOperand()
      If the current opcode has a class operand, get the associated class constant, dot-formatted
    • getRefConstantOperand

      @Deprecated public String getRefConstantOperand()
      Deprecated.
      If the current opcode has a reference constant operand, get its string representation
    • getNameConstantOperand

      public String getNameConstantOperand()
      If the current opcode has a reference constant operand, get its name
    • getSigConstantOperand

      public String getSigConstantOperand()
      If the current opcode has a reference constant operand, get its signature, slash-formatted
    • getClassConstantOperand

      @SlashedClassName public String getClassConstantOperand()
      If the current opcode has a class constant operand, get the classname, slash-formatted.
    • getStringConstantOperand

      public String getStringConstantOperand()
      If the current opcode has a string constant operand, get its name
    • getConstantRefOperand

      public org.apache.bcel.classfile.Constant getConstantRefOperand()
    • isRegisterLoad

      public boolean isRegisterLoad()
    • isRegisterStore

      public boolean isRegisterStore()
    • getRegisterOperand

      public int getRegisterOperand()
    • getIntConstant

      public int getIntConstant()
    • getLongConstant

      public long getLongConstant()
    • getBranchOffset

      public int getBranchOffset()
    • getBranchTarget

      public int getBranchTarget()
    • getBranchFallThrough

      public int getBranchFallThrough()
    • getDefaultSwitchOffset

      public int getDefaultSwitchOffset()
    • getRefFieldIsStatic

      public boolean getRefFieldIsStatic()
    • getPC

      public int getPC()
    • getPrevOpcode

      public int getPrevOpcode(int offset)
      return previous opcode;
      Parameters:
      offset - 0 for current opcode, 1 for one before that, etc.
    • isWideOpcode

      public boolean isWideOpcode()
    • isBranch

      public static boolean isBranch(int opcode)
      Return whether or not given opcode is a branch instruction.
      Parameters:
      opcode - the opcode
      Returns:
      true if instruction is a branch, false if not
    • isSwitch

      public static boolean isSwitch(int opcode)
      Return whether or not given opcode is a switch instruction.
      Parameters:
      opcode - the opcode
      Returns:
      true if instruction is a switch, false if not
    • getSwitchOffsets

      public int[] getSwitchOffsets()
    • getSwitchLabels

      public int[] getSwitchLabels()
    • getMaxPC

      public int getMaxPC()
    • getCodeByte

      public int getCodeByte(int offset)
    • getOpcode

      public int getOpcode()
    • atCatchBlock

      public boolean atCatchBlock()
    • visit

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

      public void sawDouble(double seen)
    • sawFloat

      public void sawFloat(float seen)
    • sawRegister

      public void sawRegister(int r)
    • sawInt

      public void sawInt(int seen)
    • sawLong

      public void sawLong(long seen)
    • sawBranchTo

      public void sawBranchTo(int targetPC)
    • beforeOpcode

      public boolean beforeOpcode(int seen)
      return false if we should skip calling sawOpcode
    • afterOpcode

      public void afterOpcode(int seen)
    • sawOpcode

      public void sawOpcode(int seen)
    • sawString

      public void sawString(String seen)
    • sawField

      public void sawField()
    • sawMethod

      public void sawMethod()
    • sawIMethod

      public void sawIMethod()
    • sawClass

      public void sawClass()
    • printOpCode

      public void printOpCode(int seen)
    • getNextPC

      public int getNextPC()
      Returns:
      Returns the nextPC.
    • getNextOpcode

      public int getNextOpcode()
    • getNextCodeByte

      public int getNextCodeByte(int offset)
    • isReturn

      public boolean isReturn(int opcode)
    • isShift

      public boolean isShift(int opcode)
    • areOppositeBranches

      public static boolean areOppositeBranches(int opcode1, int opcode2)
    • isRegisterStore

      public boolean isRegisterStore(int opcode)