public interface JDOEnhancer extends ClassFileTransformer
| Modifier and Type | Method and Description |
|---|---|
JDOEnhancer |
addClass(String className,
byte[] bytes)
Add an in-memory class to the items to be enhanced.
|
JDOEnhancer |
addClasses(String... classNames)
Add class(es) to the items to be enhanced.
|
JDOEnhancer |
addFiles(String... metadataFiles)
Add metadata file(s) to the items to be enhanced.
|
JDOEnhancer |
addJar(String jarFileName)
Add a jar file to the items to be enhanced.
|
JDOEnhancer |
addPersistenceUnit(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(String className)
Method to retrieve the (enhanced) bytes of the specified class.
|
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(ClassLoader loader)
Mutator to set the class loader to use for loading classes.
|
JDOEnhancer |
setOutputDirectory(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.
|
transformProperties getProperties()
JDOEnhancer setVerbose(boolean flag)
flag - Verbose?JDOEnhancer setOutputDirectory(String dirName)
dirName - Name of the directoryJDOEnhancer setClassLoader(ClassLoader loader)
loader - ClassLoader to useJDOEnhancer addPersistenceUnit(String persistenceUnit)
persistenceUnit - Name of the persistence unitJDOEnhancer addClass(String className, byte[] bytes)
className - Name of the classbytes - The bytes of the classJDOEnhancer addClasses(String... classNames)
classNames - Names of the classesJDOEnhancer addFiles(String... metadataFiles)
metadataFiles - Names of the filesJDOEnhancer addJar(String jarFileName)
jarFileName - Name of the jar fileint 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(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).Copyright © 2005–1970 Apache Software Foundation. All rights reserved.