Package org.eolang.jeo.representation
Class BytecodeRepresentation
java.lang.Object
org.eolang.jeo.representation.BytecodeRepresentation
Intermediate representation of class files from bytecode.
This class provides a unified interface for working with Java bytecode. It can read bytecode from various sources (files, byte arrays, input streams) and convert it to XMIR (EO XML representation) format with configurable detail levels.
- Since:
- 0.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionBytecodeRepresentation
(Path clazz) Constructor.BytecodeRepresentation
(org.cactoos.Input input) Constructor.BytecodeRepresentation
(Bytecode bytecode) Constructor. -
Method Summary
-
Constructor Details
-
BytecodeRepresentation
Constructor.- Parameters:
clazz
- The path to the class file to read
-
BytecodeRepresentation
Constructor.- Parameters:
bytecode
- The bytecode object containing raw bytes
-
BytecodeRepresentation
public BytecodeRepresentation(org.cactoos.Input input) Constructor.- Parameters:
input
- The input source containing bytecode
-
-
Method Details
-
name
Read class name from bytecode.- Returns:
- Fully qualified class name
-
toXmir
public com.jcabi.xml.XML toXmir()Convert to EOlang XML representation (XMIR).- Returns:
- XML representation of the bytecode
-
toEO
Convert bytecode into XMIR format.- Parameters:
params
- The disassemble params controlling the level of detail- Returns:
- XMIR representation of the bytecode
-