Class BytecodeRepresentation


  • public final class BytecodeRepresentation
    extends Object
    Intermediate representation of a class files which can be optimized from bytecode.
    Since:
    0.1
    • Constructor Detail

      • BytecodeRepresentation

        public BytecodeRepresentation​(Path clazz)
        Constructor.
        Parameters:
        clazz - Path to the class file
      • BytecodeRepresentation

        public BytecodeRepresentation​(Bytecode bytecode)
        Constructor.
        Parameters:
        bytecode - Bytecode
    • Method Detail

      • name

        public String name()
        Read class name from bytecode.
        Returns:
        Class name.
      • toEO

        public com.jcabi.xml.XML toEO()
        Convert to EOlang XML representation (XMIR).
        Returns:
        XML.
      • toEO

        public com.jcabi.xml.XML toEO​(boolean count)
        Converts bytecode into XML.
        Parameters:
        count - Do we add number to opcode name or not?
        Returns:
        XML representation of bytecode.
      • toEO

        public com.jcabi.xml.XML toEO​(boolean count,
                                      DisassembleMode mode)
        Converts bytecode into XML.
        Parameters:
        count - Do we add number to opcode name or not?
        mode - Disassemble mode.
        Returns:
        XML representation of bytecode.