Class BytecodeRepresentation

java.lang.Object
org.eolang.jeo.representation.BytecodeRepresentation

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

    • BytecodeRepresentation

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

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

      public BytecodeRepresentation(org.cactoos.Input input)
      Constructor.
      Parameters:
      input - Input source
  • Method Details

    • 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(DisassembleMode mode)
      Converts bytecode into XML.
      Parameters:
      mode - Disassemble mode.
      Returns:
      XML representation of bytecode.