FileDocCategorySizeDatePackage
ByteCodeEnhancer.javaAPI DocGlassfish v2 API3923Fri May 04 22:34:26 BST 2007com.sun.jdo.api.persistence.enhancer

ByteCodeEnhancer

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.

Fields Summary
Constructors Summary
Methods Summary
public booleanenhanceClassFile(java.io.InputStream inByteCode, java.io.OutputStream outByteCode)
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.

param
inByteCode The byte-code of the class to be enhanced.
param
outByteCode The byte-code of the enhanced class.
return
true if the class has been enhanced, false otherwise.

public booleanenhanceClassFile(java.io.InputStream in, OutputStreamWrapper out)
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).

param
inByteCode The byte-code of the class to be enhanced.
param
outByteCode The byte-code of the enhanced class.
return
true if the class has been enhanced, false otherwise.