com.objectwave.persist.bcel
Class Generator

java.lang.Object
  |
  +--com.objectwave.persist.bcel.Generator
All Implemented Interfaces:
ClassCreator

public class Generator
extends java.lang.Object
implements ClassCreator

Version:
$Id: Generator.java,v 1.7 2002/08/23 18:05:16 dave_hoag Exp $
Author:
dave_hoag

Nested Class Summary
static class Generator.Test
           
 
Constructor Summary
Generator()
           
 
Method Summary
protected  void createBaseFromTemplate(java.lang.Class domainObject)
           
protected  java.lang.Class createFinalClass(java.lang.Class domainObject)
          Generate the persistent class definition for our domain object
 java.lang.Class createPersistentClass(java.lang.Class domainObject)
           
protected  java.lang.String getCommonBaseClassName(java.lang.Class domainObject)
          Gets the commonBaseClassName attribute of the Generator object
static MyLoader getLoaderInstance(java.lang.Class clazz)
          Create a new MyLoader instance for each different parent loader we discover.
protected  void updateConstantPool(org.apache.bcel.classfile.ConstantPool cp, java.lang.String newName, java.lang.String newSuperClass)
          The class name has changed, we need to tweak the constant pool to contain the new class name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Generator

public Generator()
Method Detail

getLoaderInstance

public static MyLoader getLoaderInstance(java.lang.Class clazz)
Create a new MyLoader instance for each different parent loader we discover.

Parameters:
clazz -
Returns:
The loaderInstance value

getCommonBaseClassName

protected final java.lang.String getCommonBaseClassName(java.lang.Class domainObject)
Gets the commonBaseClassName attribute of the Generator object

Parameters:
domainObject -
Returns:
The commonBaseClassName value

createPersistentClass

public java.lang.Class createPersistentClass(java.lang.Class domainObject)
                                      throws java.lang.ClassNotFoundException
Specified by:
createPersistentClass in interface ClassCreator
Parameters:
domainObject -
Returns:
Throws:
java.lang.ClassNotFoundException

createFinalClass

protected java.lang.Class createFinalClass(java.lang.Class domainObject)
                                    throws java.lang.Exception
Generate the persistent class definition for our domain object

java.lang.Exception

updateConstantPool

protected void updateConstantPool(org.apache.bcel.classfile.ConstantPool cp,
                                  java.lang.String newName,
                                  java.lang.String newSuperClass)
The class name has changed, we need to tweak the constant pool to contain the new class name.

Parameters:
cp -
newName -
newSuperClass -

createBaseFromTemplate

protected void createBaseFromTemplate(java.lang.Class domainObject)
                               throws java.lang.Exception
Parameters:
domainObject -
Throws:
java.lang.Exception