|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.solarmetric.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.
This enhancer differs from the official 1.0 specification in the following ways:
Constructor Summary | |
JDOEnhancer(serp.bytecode.BCClass type,
Configuration conf,
ClassResolver resolver)
Constructor. |
Method Summary | |
boolean |
enhance()
Perform bytecode enhancements. |
static void |
enhance(String arg,
PrintStream log,
Configuration conf,
boolean dropCache,
ClassResolver resolver,
Verifier[] verifiers)
Deprecated. |
static void |
enhance(String arg,
PrintWriter log,
Configuration conf,
boolean dropCache,
ClassResolver resolver,
Verifier[] verifiers)
Enhance the given class. |
static void |
enhance(String arg,
PrintWriter log,
Configuration conf,
OutputProvider output,
boolean dropCache,
ClassResolver resolver,
Verifier[] verifiers)
Enhance the given class. |
ClassMetaData |
getClassMetaData()
Return the ClassMetaData object for this class,
or null if not persistence capable. |
PrintWriter |
getLog()
Return the stream being used for logging, or null if none. |
serp.bytecode.BCClass |
getSourceBytecode()
Return the bytecode representation of the class being enhanced. |
boolean |
isPersistenceCapable()
Return true if the class being enhanced is a PersistenceCapable type. |
static void |
main(String[] args)
Usage: java com.solarmetric.kodo.enhance.JDOEnhancer [option]* <class name | .class file | .jdo file>+ |
void |
setLog(PrintStream log)
Deprecated. |
void |
setLog(PrintWriter log)
Set the PrintWrtier to use for status messages. |
void |
setVerifiers(Verifier[] verifiers)
Set the verifiers that should be used for this enhancement run. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public JDOEnhancer(serp.bytecode.BCClass type, Configuration conf, ClassResolver resolver)
type
- the bytecode representation fo the type to
enhance; this can be created from any stream or fileconf
- system configurationMethod Detail |
public static void main(String[] args) throws Exception
Usage: java com.solarmetric.kodo.enhance.JDOEnhancer [option]* <class name | .class file | .jdo file>+
Where the following options are recognized.
Configuration
; optionalConfiguration
can be set by using
their names and supplying a value; for example:
-licenseKey adslfja83r3lkadf
If the license key is not specified otherwise, Kodo will check for
default preference files with license keys as outlined in
DefaultConfiguration
.
Each additional argument can be either the full class name of the
type to enhance, 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.
public static void enhance(String arg, PrintStream log, Configuration conf, boolean dropCache, ClassResolver resolver, Verifier[] verifiers) throws IOException
arg
- the argument to parse for classes to enhancelog
- the stream to log messages to, or null for no logconf
- system configurationIOException
- if unable to save enhanced bytecodepublic static void enhance(String arg, PrintWriter log, Configuration conf, boolean dropCache, ClassResolver resolver, Verifier[] verifiers) throws IOException
arg
- the argument to parse for classes to enhancelog
- the writer to log messages to, or null for no logconf
- system configurationIOException
- if unable to save enhanced bytecodepublic static void enhance(String arg, PrintWriter log, Configuration conf, OutputProvider output, boolean dropCache, ClassResolver resolver, Verifier[] verifiers) throws IOException
arg
- the argument to parse for classes to enhancelog
- the stream to log messages to, or null for no logconf
- system configurationoutput
- the output provider for a given classIOException
- if unable to save enhanced bytecodepublic void setVerifiers(Verifier[] verifiers)
public PrintWriter getLog()
public void setLog(PrintStream log)
public void setLog(PrintWriter log)
public serp.bytecode.BCClass getSourceBytecode()
public boolean isPersistenceCapable()
PersistenceCapable
type.public ClassMetaData getClassMetaData()
ClassMetaData
object for this class,
or null if not persistence capable.public boolean enhance()
|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |