Class BytecodeProgram


  • public final class BytecodeProgram
    extends Object
    Bytecode program.
    Since:
    0.6
    • Constructor Detail

      • BytecodeProgram

        public BytecodeProgram​(String pckg)
        Constructor.
        Parameters:
        pckg - Package.
      • BytecodeProgram

        public BytecodeProgram​(BytecodeClass... classes)
        Constructor.
        Parameters:
        classes - Classes.
      • BytecodeProgram

        public BytecodeProgram​(String pckg,
                               BytecodeClass... classes)
        Constructor.
        Parameters:
        pckg - Package.
        classes - Classes.
      • BytecodeProgram

        public BytecodeProgram​(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 BytecodeProgram replaceTopClass​(BytecodeClass clazz)
        Copy program with replaced top class.
        Parameters:
        clazz - Class to replace.
        Returns:
        Program with replaced top class.
      • withoutTopClass

        public BytecodeProgram withoutTopClass()
        Copy program without top class.
        Returns:
        Program without top class.
      • directives

        public DirectivesProgram directives​(String listing)
        Convert to directives.
        Parameters:
        listing - Program listing.
        Returns:
        Directives program.