Class BytecodeObject
- java.lang.Object
-
- org.eolang.jeo.representation.bytecode.BytecodeObject
-
public final class BytecodeObject extends Object
Bytecode program.- Since:
- 0.6
-
-
Constructor Summary
Constructors Constructor Description BytecodeObject(String pckg)
Constructor.BytecodeObject(String pckg, List<BytecodeClass> classes)
Constructor.BytecodeObject(String pckg, BytecodeClass... classes)
Constructor.BytecodeObject(BytecodeClass... classes)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Bytecode
bytecode()
Generate bytecode.DirectivesObject
directives(String listing)
Convert to directives.BytecodeObject
replaceTopClass(BytecodeClass clazz)
Copy program with replaced top class.BytecodeClass
top()
Get top class.com.jcabi.xml.XML
xml()
Converts bytecode into XML.
-
-
-
Constructor Detail
-
BytecodeObject
public BytecodeObject(String pckg)
Constructor.- Parameters:
pckg
- Package.
-
BytecodeObject
public BytecodeObject(BytecodeClass... classes)
Constructor.- Parameters:
classes
- Classes.
-
BytecodeObject
public BytecodeObject(String pckg, BytecodeClass... classes)
Constructor.- Parameters:
pckg
- Package.classes
- Classes.
-
BytecodeObject
public BytecodeObject(String pckg, List<BytecodeClass> classes)
Constructor.- Parameters:
pckg
- Package.classes
- Classes.
-
-
Method Detail
-
xml
public com.jcabi.xml.XML xml()
Converts bytecode into XML.- Returns:
- XML representation of bytecode.
-
bytecode
public Bytecode bytecode()
Generate bytecode. Traverse XML and build bytecode class.- Returns:
- Bytecode.
-
top
public BytecodeClass top()
Get top class.- Returns:
- Top class.
-
replaceTopClass
public BytecodeObject replaceTopClass(BytecodeClass clazz)
Copy program with replaced top class.- Parameters:
clazz
- Class to replace.- Returns:
- Program with replaced top class.
-
directives
public DirectivesObject directives(String listing)
Convert to directives.- Parameters:
listing
- Program listing.- Returns:
- Directives program.
-
-