Package org.eolang.jeo.representation
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 Summary
Constructors Constructor Description BytecodeRepresentation(Path clazz)
Constructor.BytecodeRepresentation(org.cactoos.Input input)
Constructor.BytecodeRepresentation(Bytecode bytecode)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
name()
Read class name from bytecode.com.jcabi.xml.XML
toEO()
Convert to EOlang XML representation (XMIR).com.jcabi.xml.XML
toEO(DisassembleMode mode)
Converts bytecode into XML.
-
-
-
Constructor Detail
-
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 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(DisassembleMode mode)
Converts bytecode into XML.- Parameters:
mode
- Disassemble mode.- Returns:
- XML representation of bytecode.
-
-