## 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,v 1.4 2002/11/30 11:12:21 mdahm Exp $
Author:
  M. Dahm

Constructor Summary
`BCELifier(JavaClass clazz, java.io.OutputStream out)`

Method Summary
`static void` `main(java.lang.String[] argv)` Default main method
`void` `start()` Start Java code generation
`void` `visitField(Field field)`
`void` `visitJavaClass(JavaClass clazz)`
`void` `visitMethod(Method method)`

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`

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

### 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(java.lang.String[] argv)
                     throws java.lang.Exception

  Default main method

    `java.lang.Exception`

Copyright © 2002-2003 Apache Software Foundation. All Rights Reserved.