Class FilterEnhancer
java.lang.Object
com.sun.jdo.api.persistence.enhancer.util.Assertion
com.sun.jdo.api.persistence.enhancer.util.Support
com.sun.jdo.api.persistence.enhancer.FilterEnhancer
- All Implemented Interfaces:
ByteCodeEnhancer
Implements a JDO enhancer as a byte-code filtering tool.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFilterEnhancer(JDOMetaData metaData, Properties settings, PrintWriter out, PrintWriter err) Creates an instance of a JDO enhancer.FilterEnhancer(com.sun.jdo.api.persistence.model.Model metaData, Properties settings, PrintWriter out, PrintWriter err) Creates an instance of a JDO enhancer.FilterEnhancer(Properties metaData, Properties settings, PrintWriter out, PrintWriter err) Creates an instance of a JDO enhancer. -
Method Summary
Modifier and TypeMethodDescriptionbooleanenhanceClassFile(InputStream inByteCode, OutputStreamWrapper outByteCode) Enhances a given class according to the JDO meta-data.booleanenhanceClassFile(InputStream in, OutputStream out) Enhances a given class according to the JDO meta-data.protected voidinit(JDOMetaData metaData, Properties settings, PrintWriter out, PrintWriter err) Initializes an instance of a JDO enhancer.Methods inherited from class com.sun.jdo.api.persistence.enhancer.util.Support
getI18N, getI18N, getI18N, getI18N, getI18N, getI18N
-
Field Details
-
DO_SIMPLE_TIMING
- See Also:
-
VERBOSE_LEVEL
- See Also:
-
VERBOSE_LEVEL_QUIET
- See Also:
-
VERBOSE_LEVEL_WARN
- See Also:
-
VERBOSE_LEVEL_VERBOSE
- See Also:
-
VERBOSE_LEVEL_DEBUG
- See Also:
-
-
Constructor Details
-
FilterEnhancer
public FilterEnhancer(JDOMetaData metaData, Properties settings, PrintWriter out, PrintWriter err) throws EnhancerUserException, EnhancerFatalError Creates an instance of a JDO enhancer.- Parameters:
metaData- the JDO meta-data objectsettings- enhancement propertiesout- standard ouput stream for the enhancer- Throws:
EnhancerUserExceptionEnhancerFatalError
-
FilterEnhancer
public FilterEnhancer(Properties metaData, Properties settings, PrintWriter out, PrintWriter err) throws EnhancerUserException, EnhancerFatalError Creates an instance of a JDO enhancer.- Parameters:
metaData- the JDO meta-data propertiessettings- enhancement propertiesout- standard ouput stream for the enhancer- Throws:
EnhancerUserExceptionEnhancerFatalError
-
FilterEnhancer
public FilterEnhancer(com.sun.jdo.api.persistence.model.Model metaData, Properties settings, PrintWriter out, PrintWriter err) throws EnhancerUserException, EnhancerFatalError Creates an instance of a JDO enhancer.- Parameters:
metaData- the JDO modelsettings- enhancement propertiesout- standard ouput stream for the enhancer- Throws:
EnhancerUserExceptionEnhancerFatalError
-
-
Method Details
-
init
protected void init(JDOMetaData metaData, Properties settings, PrintWriter out, PrintWriter err) throws EnhancerUserException, EnhancerFatalError Initializes an instance of a JDO enhancer.- Parameters:
metaData- the JDO meta-data objectsettings- enhancement propertiesout- standard ouput stream for the enhancer- Throws:
EnhancerUserExceptionEnhancerFatalError
-
enhanceClassFile
public boolean enhanceClassFile(InputStream inByteCode, OutputStreamWrapper outByteCode) throws EnhancerUserException, EnhancerFatalError Enhances a given class according to the JDO meta-data.- Specified by:
enhanceClassFilein interfaceByteCodeEnhancer- 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
public boolean enhanceClassFile(InputStream in, OutputStream out) throws EnhancerUserException, EnhancerFatalError Description copied from interface:ByteCodeEnhancerEnhances 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.- Specified by:
enhanceClassFilein interfaceByteCodeEnhancer- 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
-