Class BCELifier

  • All Implemented Interfaces:
    Visitor

    public class BCELifier
    extends EmptyVisitor
    This class takes a given JavaClass object and converts it to a Java program that creates that very class using BCEL. This gives new users of BCEL a useful example showing how things are done with BCEL. It does not cover all features of BCEL, but tries to mimic hand-written code as close as possible.
    • Constructor Detail

      • BCELifier

        public BCELifier​(JavaClass clazz,
                         java.io.OutputStream out)
        Parameters:
        clazz - Java class to "decompile"
        out - where to output Java program
    • Method Detail

      • start

        public void start()
        Start Java code generation
      • printFlags

        public static java.lang.String printFlags​(int flags,
                                                  BCELifier.FLAGS location)
        Return a string with the flag settings
        Parameters:
        flags - the flags field to interpret
        location - the item type
        Returns:
        the formatted string
        Since:
        6.0 made public
      • main

        public static void main​(java.lang.String[] argv)
                         throws java.lang.Exception
        Default main method
        Throws:
        java.lang.Exception