org.apache.bcel.util
Class BCELifier
java.lang.Object
org.apache.bcel.classfile.EmptyVisitor
org.apache.bcel.util.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.
- Version:
- $Id: BCELifier.java 394939 2006-04-18 13:23:49Z tcurdt $
Methods inherited from class org.apache.bcel.classfile.EmptyVisitor |
visitCode, visitCodeException, visitConstantClass, visitConstantDouble, visitConstantFieldref, visitConstantFloat, visitConstantInteger, visitConstantInterfaceMethodref, visitConstantLong, visitConstantMethodref, visitConstantNameAndType, visitConstantPool, visitConstantString, visitConstantUtf8, visitConstantValue, visitDeprecated, visitExceptionTable, visitInnerClass, visitInnerClasses, visitLineNumber, visitLineNumberTable, visitLocalVariable, visitLocalVariableTable, visitSignature, visitSourceFile, visitStackMap, visitStackMapEntry, visitSynthetic, visitUnknown |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BCELifier
public BCELifier(JavaClass clazz,
OutputStream out)
- Parameters:
clazz
- Java class to "decompile"out
- where to output Java program
start
public void start()
- Start Java code generation
visitJavaClass
public void visitJavaClass(JavaClass clazz)
- Specified by:
visitJavaClass
in interface Visitor
- Overrides:
visitJavaClass
in class EmptyVisitor
visitField
public void visitField(Field field)
- Specified by:
visitField
in interface Visitor
- Overrides:
visitField
in class EmptyVisitor
visitMethod
public void visitMethod(Method method)
- Specified by:
visitMethod
in interface Visitor
- Overrides:
visitMethod
in class EmptyVisitor
main
public static void main(String[] argv)
throws Exception
- Default main method
- Throws:
Exception
Copyright © 2002-2006 Apache Software Foundation. All Rights Reserved.