Package org.eolang.jeo.representation
Class BytecodeRepresentation
java.lang.Object
org.eolang.jeo.representation.BytecodeRepresentation
Intermediate representation of a class files which can be optimized from bytecode.
- Since:
- 0.1
-
Constructor Summary
ConstructorsConstructorDescriptionBytecodeRepresentation
(Path clazz) Constructor.BytecodeRepresentation
(org.cactoos.Input input) Constructor.BytecodeRepresentation
(Bytecode bytecode) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionname()
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 Details
-
BytecodeRepresentation
Constructor.- Parameters:
clazz
- Path to the class file
-
BytecodeRepresentation
Constructor.- Parameters:
bytecode
- Bytecode
-
BytecodeRepresentation
public BytecodeRepresentation(org.cactoos.Input input) Constructor.- Parameters:
input
- Input source
-
-
Method Details
-
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
Converts bytecode into XML.- Parameters:
mode
- Disassemble mode.- Returns:
- XML representation of bytecode.
-