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
public class FilterEnhancer extends Support implements ByteCodeEnhancer
Implements a JDO enhancer as a byte-code filtering tool.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDO_SIMPLE_TIMINGstatic StringVERBOSE_LEVELstatic StringVERBOSE_LEVEL_DEBUGstatic StringVERBOSE_LEVEL_QUIETstatic StringVERBOSE_LEVEL_VERBOSEstatic StringVERBOSE_LEVEL_WARN
-
Constructor Summary
Constructors Constructor Description FilterEnhancer(JDOMetaData metaData, Properties settings, PrintWriter out, PrintWriter err)Creates an instance of a JDO enhancer.FilterEnhancer(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanenhanceClassFile(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 Detail
-
DO_SIMPLE_TIMING
public static final String DO_SIMPLE_TIMING
- See Also:
- Constant Field Values
-
VERBOSE_LEVEL
public static final String VERBOSE_LEVEL
- See Also:
- Constant Field Values
-
VERBOSE_LEVEL_QUIET
public static final String VERBOSE_LEVEL_QUIET
- See Also:
- Constant Field Values
-
VERBOSE_LEVEL_WARN
public static final String VERBOSE_LEVEL_WARN
- See Also:
- Constant Field Values
-
VERBOSE_LEVEL_VERBOSE
public static final String VERBOSE_LEVEL_VERBOSE
- See Also:
- Constant Field Values
-
VERBOSE_LEVEL_DEBUG
public static final String VERBOSE_LEVEL_DEBUG
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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(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 Detail
-
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
-
-