Class ClassFile.Builder

    • Method Detail

      • add

        <T> T add​(java.lang.String name,
                  T value)
        Appends name and value to children and returns value.
        Type Parameters:
        T - a value type.
        Parameters:
        name - a name.
        value - a value.
        Returns:
        value
      • addInsnIndex

        int addInsnIndex​(java.lang.String name,
                         int bytecodeOffset)
        Appends name and the instruction index corresponding to bytecodeOffset to children, and returns bytecodeOffset.
        Parameters:
        name - a name.
        bytecodeOffset - the offset of a bytecode instruction.
        Returns:
        bytecodeOffset.
      • addInsn

        void addInsn​(int insnIndex,
                     int opcode,
                     java.lang.Object... arguments)
        Appends the given arguments to children.
        Parameters:
        insnIndex - the index of a bytecode instruction.
        opcode - a bytecode instruction opcode.
        arguments - the bytecode instruction arguments.
      • addCpInfo

        void addCpInfo​(java.lang.String name,
                       int cpIndex)
        Appends name and the CpInfo corresponding to cpIndex to children.
        Parameters:
        name - a name.
        cpIndex - a constant pool item index.
      • sortByContent

        void sortByContent()
        Use the content of this builder, instead of its name, to sort it in a SortedBuilder.
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object