|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpox.enhancer.AbstractClassEnhancer
public abstract class AbstractClassEnhancer
Abstract representation of a class enhancer. To be extended by implementing enhancers.
| Field Summary | |
|---|---|
java.lang.String |
className
Class name of the class being enhanced |
protected org.jpox.ClassLoaderResolver |
clr
Class Loader Resolver to use for any loading issues. |
protected org.jpox.metadata.ClassMetaData |
cmd
MetaData for the class being enhanced. |
protected java.util.List |
fieldsToAdd
List of fields to be added to the class. |
protected boolean |
initialised
Flag for whether we are initialised. |
protected static org.jpox.util.Localiser |
LOCALISER
Message resource |
protected java.util.List |
methodsToAdd
List of methods to be added to the class. |
protected boolean |
update
Flag specifying if the class needs updating. |
| Constructor Summary | |
|---|---|
AbstractClassEnhancer(org.jpox.metadata.ClassMetaData cmd,
org.jpox.ClassLoaderResolver clr)
Constructor. |
|
| Method Summary | |
|---|---|
org.jpox.ClassLoaderResolver |
getClassLoaderResolver()
Accessor for the ClassLoaderResolver |
org.jpox.metadata.ClassMetaData |
getClassMetaData()
Accessor for the ClassMetaData for the class. |
java.util.List |
getFieldsList()
Accessor for the fields required. |
java.util.List |
getMethodsList()
Accessor for the methods required. |
protected void |
initialise()
Initialisation of the information for enhancing this class. |
protected abstract void |
initialiseFieldsList()
Method to initialise the list of fields to add. |
protected abstract void |
initialiseMethodsList()
Method to initialise the list of methods to add. |
boolean |
isPersistenceCapable(java.lang.String className)
Check if the class is PersistenceCapable or is going to be enhanced based on the metadata |
protected boolean |
requiresDetachable()
Convenience method for whether this class needs to implement Detachable |
void |
save(java.lang.String directoryName)
Method to save the class definition bytecode into a class file. |
void |
verify()
Method to verify the class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jpox.enhancer.ClassEnhancer |
|---|
checkEnhanced, enhance, getBytes |
| Field Detail |
|---|
protected static org.jpox.util.Localiser LOCALISER
protected final org.jpox.ClassLoaderResolver clr
protected final org.jpox.metadata.ClassMetaData cmd
public final java.lang.String className
protected boolean update
protected java.util.List fieldsToAdd
protected java.util.List methodsToAdd
protected boolean initialised
| Constructor Detail |
|---|
public AbstractClassEnhancer(org.jpox.metadata.ClassMetaData cmd,
org.jpox.ClassLoaderResolver clr)
cmd - MetaData for the class to be enhancedclr - ClassLoader resolver| Method Detail |
|---|
protected void initialise()
protected abstract void initialiseMethodsList()
protected abstract void initialiseFieldsList()
public java.util.List getMethodsList()
public java.util.List getFieldsList()
public org.jpox.ClassLoaderResolver getClassLoaderResolver()
getClassLoaderResolver in interface ClassEnhancerpublic org.jpox.metadata.ClassMetaData getClassMetaData()
ClassEnhancer
getClassMetaData in interface ClassEnhancerprotected boolean requiresDetachable()
public boolean isPersistenceCapable(java.lang.String className)
className - the class name
public void verify()
throws java.lang.Exception
verify in interface ClassEnhancerjava.lang.Exception - Thrown if an error occurs while verifying
public void save(java.lang.String directoryName)
throws java.io.IOException
save in interface ClassEnhancerdirectoryName - Name of a directory (or null to overwrite the class)
java.io.IOException - If an I/O error occurs in the write.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||