Class TypedBlock

    • Field Detail

      • stackTop

        public int stackTop
      • numLocals

        public int numLocals
      • localsTypes

        public TypeData[] localsTypes
      • stackTypes

        public TypeData[] stackTypes
    • Constructor Detail

      • TypedBlock

        protected TypedBlock​(int pos)
    • Method Detail

      • 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​(java.lang.StringBuilder sbuf)
        Overrides:
        toString2 in class BasicBlock
      • printTypes

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

        public boolean alreadySet()
      • resetNumLocals

        public void resetNumLocals()
      • initFirstBlock

        void initFirstBlock​(int maxStack,
                            int maxLocals,
                            java.lang.String className,
                            java.lang.String methodDesc,
                            boolean isStatic,
                            boolean isConstructor)
                     throws BadBytecode
        Initializes the first block by the given method descriptor.
        Parameters:
        block - the first basic block that this method initializes.
        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.
        Throws:
        BadBytecode
      • toPrimitiveTag

        private static TypeData toPrimitiveTag​(char c)
      • getRetType

        public static java.lang.String getRetType​(java.lang.String desc)