Package org.eolang.jeo.representation
Class BytecodeRepresentation
- java.lang.Object
-
- org.eolang.jeo.representation.BytecodeRepresentation
-
public final class BytecodeRepresentation extends Object
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
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.String
toEO(DisassembleParams params)
Convert bytecode into XMIR format.com.jcabi.xml.XML
toXmir()
Convert to EOlang XML representation (XMIR).
-
-
-
Constructor Detail
-
BytecodeRepresentation
public BytecodeRepresentation(Path clazz)
Constructor.- Parameters:
clazz
- The path to the class file to read
-
BytecodeRepresentation
public BytecodeRepresentation(Bytecode bytecode)
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 Detail
-
name
public String 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
public String toEO(DisassembleParams params)
Convert bytecode into XMIR format.- Parameters:
params
- The disassemble params controlling the level of detail- Returns:
- XMIR representation of the bytecode
-
-