Class TypedBlock

java.lang.Object
javassist.bytecode.stackmap.BasicBlock
javassist.bytecode.stackmap.TypedBlock

public class TypedBlock extends BasicBlock
  • Field Details

    • stackTop

      public int stackTop
    • numLocals

      public int numLocals
    • localsTypes

      public TypeData[] localsTypes
    • stackTypes

      public TypeData[] stackTypes
  • Constructor Details

    • TypedBlock

      protected TypedBlock(int pos)
  • Method Details

    • makeBlocks

      public static TypedBlock[] makeBlocks(MethodInfo minfo, CodeAttribute ca, boolean optimize) throws BadBytecode
      Divides the method body into basic blocks. The type information of the first block is initialized.
      Parameters:
      optimize - if it is true and the method does not include branches, this method returns null.
      Throws:
      BadBytecode
    • toString2

      protected void toString2(StringBuilder sbuf)
      Overrides:
      toString2 in class BasicBlock
    • printTypes

      private void printTypes(StringBuilder sbuf, int size, TypeData[] types)
    • alreadySet

      public boolean alreadySet()
    • setStackMap

      public void setStackMap(int st, TypeData[] stack, int nl, TypeData[] locals) throws BadBytecode
      Throws:
      BadBytecode
    • resetNumLocals

      public void resetNumLocals()
    • initFirstBlock

      void initFirstBlock(int maxStack, int maxLocals, String className, String methodDesc, boolean isStatic, boolean isConstructor) throws BadBytecode
      Initializes the first block by the given method descriptor.
      Parameters:
      className - a dot-separated fully qualified class name. For example, javassist.bytecode.stackmap.BasicBlock.
      methodDesc - method descriptor.
      isStatic - true if the method is a static method.
      isConstructor - true if the method is a constructor.
      block - the first basic block that this method initializes.
      Throws:
      BadBytecode
    • descToTag

      private static int descToTag(String desc, int i, int n, TypeData[] types) throws BadBytecode
      Throws:
      BadBytecode
    • toPrimitiveTag

      private static TypeData toPrimitiveTag(char c)
    • getRetType

      public static String getRetType(String desc)