|
SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.solarmetric.rd.kodo.enhance.JDOEnhancer
Bytecode enhancer used to create PersistenceCapable classes from
JDO metadata. The bytecode modifications made by this enhancer are
consistent with the description of the reference enhancer
in the JDO 1.0 Specification.
The enhancer must be invoked on all persistence-capable and persistence aware classes before running any application that uses JDO. Additionally, before the enhancer can be invoked, JDO metadata must be available for all persistence-capable types.
| Constructor Summary | |
JDOEnhancer(com.solarmetric.rd.kodo.conf.JDOConfiguration conf,
serp.bytecode.BCClass type,
com.solarmetric.rd.kodo.meta.JDOMetaDataRepository repos)
Constructor. |
|
JDOEnhancer(com.solarmetric.rd.kodo.conf.JDOConfiguration conf,
java.lang.Class type)
Constructor. |
|
JDOEnhancer(com.solarmetric.rd.kodo.conf.JDOConfiguration conf,
com.solarmetric.rd.kodo.meta.ClassMetaData type)
Constructor. |
|
| Method Summary | |
boolean |
enhance()
Perform bytecode enhancements. |
serp.bytecode.BCClass |
getBytecode()
Return the bytecode representation of the class being enhanced. |
com.solarmetric.rd.kodo.meta.ClassMetaData |
getClassMetaData()
Return the ClassMetaData object for this class,
or null if not persistence capable. |
java.io.File |
getCodeDirectory()
The base build directory to generate code to. |
com.solarmetric.rd.kodo.meta.ClassMetaData |
getMetaData()
Return the metadata for the class being enhanced. |
java.lang.Class |
getType()
Return the type being enhanced. |
boolean |
isPersistenceCapable()
Return true if the class being enhanced is a PersistenceCapable type. |
static void |
main(java.lang.String[] args)
Usage: java com.solarmetric.kodo.enhance.JDOEnhancer [option]* <class name | .java file | .class file | .jdo file>+ |
static boolean |
run(com.solarmetric.rd.kodo.conf.JDOConfiguration conf,
java.lang.String[] args,
com.solarmetric.rd.kodo.meta.JDOMetaDataRepository repos,
java.io.File dir,
java.lang.ClassLoader loader)
Enhance the given class. |
void |
setCodeDirectory(java.io.File dir)
The base build directory to generate code to. |
void |
writeBytecode()
Write the generated bytecode. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JDOEnhancer(com.solarmetric.rd.kodo.conf.JDOConfiguration conf,
java.lang.Class type)
public JDOEnhancer(com.solarmetric.rd.kodo.conf.JDOConfiguration conf,
com.solarmetric.rd.kodo.meta.ClassMetaData type)
public JDOEnhancer(com.solarmetric.rd.kodo.conf.JDOConfiguration conf,
serp.bytecode.BCClass type,
com.solarmetric.rd.kodo.meta.JDOMetaDataRepository repos)
type - the bytecode representation fo the type to
enhance; this can be created from any stream or filerepos - A metadata repository to use for metadata access,
or null to create a new reporitory; the repository
from the given configuration isn't used by default
because the configuration might be an
implementation-specific subclass whose metadata
required more than just base JDO metadata files| Method Detail |
public java.io.File getCodeDirectory()
public void setCodeDirectory(java.io.File dir)
public serp.bytecode.BCClass getBytecode()
public java.lang.Class getType()
public com.solarmetric.rd.kodo.meta.ClassMetaData getMetaData()
public boolean isPersistenceCapable()
PersistenceCapable type.
public com.solarmetric.rd.kodo.meta.ClassMetaData getClassMetaData()
ClassMetaData object for this class,
or null if not persistence capable.
public boolean enhance()
public void writeBytecode()
throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args)
throws java.io.IOException
Usage: java com.solarmetric.kodo.enhance.JDOEnhancer [option]* <class name | .java file | .class file | .jdo file>+
Where the following options are recognized.
Configuration; optional.JDOConfiguration can be
set by using their names and supplying a value; for example:
-licenseKey adslfja83r3lkadfEach additional argument can be either the full class name of the
type to enhance, the path to the .java file for the type, the path to
the .class file for the type, or the path to a .jdo file listing one
or more types to enhance.
If the type being enhanced has JDO metadata, it will be enhanced as a
persistence capable class. If not, it will be considered a persistence
aware class, and all access to fields of persistence capable classes
will be replaced by the appropriate get/set method. If the type
explicitly declares the PersistenceCapable interface, it will
not be enhanced. Thus, it is safe to invoke the enhancer on classes
that are already enhanced.
java.io.IOException
public static boolean run(com.solarmetric.rd.kodo.conf.JDOConfiguration conf,
java.lang.String[] args,
com.solarmetric.rd.kodo.meta.JDOMetaDataRepository repos,
java.io.File dir,
java.lang.ClassLoader loader)
throws java.io.IOException
conf - configuration containing license key information,
logging information, etc.args - the arguments to parse for classes to enhancerepos - a metadata repository to use for metadata access,
or null to create a new repository; the repository
from the given configuration isn't used by default
because the configuration might be an
implementation-specific subclass whose function
requires more than just base JDO metadata filesdir - the output directory, or null to overwrite original
class file
java.io.IOException - if unable to save enhanced bytecode
|
SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||