|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface JDOEnhancer
Interface for a JDO Enhancer.
| Method Summary | |
|---|---|
JDOEnhancer |
addClass(java.lang.String className,
byte[] bytes)
Add an in-memory class to the items to be enhanced. |
JDOEnhancer |
addClasses(java.lang.String... classNames)
Add class(es) to the items to be enhanced. |
JDOEnhancer |
addFiles(java.lang.String... metadataFiles)
Add metadata file(s) to the items to be enhanced. |
JDOEnhancer |
addJar(java.lang.String jarFileName)
Add a jar file to the items to be enhanced. |
JDOEnhancer |
addPersistenceUnit(java.lang.String persistenceUnit)
Add a persistence-unit to the items to be enhanced. |
int |
enhance()
Method to enhance the items specified using addJar, addFiles, addClasses, addClass, addPersistenceUnit. |
byte[] |
getEnhancedBytes(java.lang.String className)
Method to retrieve the (enhanced) bytes of the specified class. |
java.util.Properties |
getProperties()
Return non-configurable properties of this JDOEnhancer. |
JDOMetadata |
newMetadata()
Method to return a new metadata object that can be subsequently modified and registered with the enhancement process using the method registerMetadata(javax.jdo.metadata.JDOMetadata). |
void |
registerMetadata(JDOMetadata metadata)
Method to register metadata with the enhancement process managed by this JDOEnhancer. |
JDOEnhancer |
setClassLoader(java.lang.ClassLoader loader)
Mutator to set the class loader to use for loading classes. |
JDOEnhancer |
setOutputDirectory(java.lang.String dirName)
Mutator to set the location where enhanced classes are written. |
JDOEnhancer |
setVerbose(boolean flag)
Whether to provide verbose output |
int |
validate()
Method to validate the items specified using addJar, addFiles, addClasses, addClass, addPersistenceUnit. |
| Methods inherited from interface java.lang.instrument.ClassFileTransformer |
|---|
transform |
| Method Detail |
|---|
java.util.Properties getProperties()
JDOEnhancer setVerbose(boolean flag)
flag - Verbose?
JDOEnhancer setOutputDirectory(java.lang.String dirName)
dirName - Name of the directory
JDOEnhancer setClassLoader(java.lang.ClassLoader loader)
loader - ClassLoader to use
JDOEnhancer addPersistenceUnit(java.lang.String persistenceUnit)
persistenceUnit - Name of the persistence unit
JDOEnhancer addClass(java.lang.String className,
byte[] bytes)
className - Name of the classbytes - The bytes of the class
JDOEnhancer addClasses(java.lang.String... classNames)
classNames - Names of the classes
JDOEnhancer addFiles(java.lang.String... metadataFiles)
metadataFiles - Names of the files
JDOEnhancer addJar(java.lang.String jarFileName)
jarFileName - Name of the jar file
int enhance()
JDOEnhanceException - if an error occurs during enhancement. If multiple
errors occur then the nested exceptions provides this detail.int validate()
JDOEnhanceException - if an error occurs during validation. If multiple
errors occur then the nested exceptions provides this detail.byte[] getEnhancedBytes(java.lang.String className)
className - Name of the class (of the form "mydomain.MyClass")
void registerMetadata(JDOMetadata metadata)
JDOEnhancer.
Metadata can be created using the method newMetadata().
If there is already metadata registered for a class contained in this metadata
object then a JDOUserException will be thrown.
metadata - The Metadata to register.JDOMetadata newMetadata()
registerMetadata(javax.jdo.metadata.JDOMetadata).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||