Interface ByteCodeEnhancer
- All Known Implementing Classes:
ByteCodeEnhancerTimer,FilterEnhancer
public interface ByteCodeEnhancer
A JDO enhancer, or byte-code enhancer, modifies the byte-codes of
Java class files to enable transparent loading and storing of the
fields of the persistent instances.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanEnhances a given class according to the JDO meta-data.booleanenhanceClassFile(InputStream inByteCode, OutputStream outByteCode) Enhances a given class according to the JDO meta-data.
-
Method Details
-
enhanceClassFile
boolean enhanceClassFile(InputStream inByteCode, OutputStream outByteCode) throws EnhancerUserException, EnhancerFatalError Enhances a given class according to the JDO meta-data. If the input class has been enhanced or not - the output stream is always written, either with the enhanced class or with the non-enhanced class.- Parameters:
inByteCode- The byte-code of the class to be enhanced.outByteCode- The byte-code of the enhanced class.- Returns:
trueif the class has been enhanced,falseotherwise.- Throws:
EnhancerUserExceptionEnhancerFatalError
-
enhanceClassFile
boolean enhanceClassFile(InputStream in, OutputStreamWrapper out) throws EnhancerUserException, EnhancerFatalError Enhances a given class according to the JDO meta-data. If the input class has been enhanced or not - the output stream is always written, either with the enhanced class or with the non-enhanced class.
Furthermore the enhancer has to set the classname of the enhanced class to the output stream wrapper object (it's possible to get the input stream without knowing the classname).- Parameters:
in- The byte-code of the class to be enhanced.out- The byte-code of the enhanced class.- Returns:
trueif the class has been enhanced,falseotherwise.- Throws:
EnhancerUserExceptionEnhancerFatalError
-