org.apache.jdo.impl.enhancer.core
Class EnhancerFilter
java.lang.Object
org.apache.jdo.impl.enhancer.util.Assertion
org.apache.jdo.impl.enhancer.util.Support
org.apache.jdo.impl.enhancer.core.EnhancerFilter
- All Implemented Interfaces:
- ClassFileEnhancer
- public class EnhancerFilter
- extends Support
- implements ClassFileEnhancer
Provides a JDO byte-code enhancer.
Fields inherited from class org.apache.jdo.impl.enhancer.util.Support |
timer |
Constructor Summary |
EnhancerFilter(EnhancerMetaData metaData,
java.util.Properties settings,
java.io.PrintWriter out,
java.io.PrintWriter err)
Creates an instance of a JDO enhancer. |
Method Summary |
boolean |
enhanceClassFile(java.io.InputStream in,
java.io.OutputStream out)
Enhances a given class according to the JDO meta-data. |
boolean |
enhanceClassFile(java.io.InputStream inClassFile,
OutputStreamWrapper outClassFile)
Enhances a given class according to the JDO meta-data. |
private boolean |
enhanceClassFile1(java.io.InputStream inClassFile,
OutputStreamWrapper outClassFile)
Enhances a given class according to the JDO meta-data. |
protected void |
init(EnhancerMetaData metaData,
java.util.Properties settings,
java.io.PrintWriter out,
java.io.PrintWriter err)
Initializes an instance of a JDO enhancer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DO_TIMING_STATISTICS
public static final java.lang.String DO_TIMING_STATISTICS
- See Also:
- Constant Field Values
DUMP_CLASS
public static final java.lang.String DUMP_CLASS
- See Also:
- Constant Field Values
NO_AUGMENT
public static final java.lang.String NO_AUGMENT
- See Also:
- Constant Field Values
NO_ANNOTATE
public static final java.lang.String NO_ANNOTATE
- See Also:
- Constant Field Values
VERBOSE_LEVEL
public static final java.lang.String VERBOSE_LEVEL
- See Also:
- Constant Field Values
VERBOSE_LEVEL_QUIET
public static final java.lang.String VERBOSE_LEVEL_QUIET
- See Also:
- Constant Field Values
VERBOSE_LEVEL_WARN
public static final java.lang.String VERBOSE_LEVEL_WARN
- See Also:
- Constant Field Values
VERBOSE_LEVEL_VERBOSE
public static final java.lang.String VERBOSE_LEVEL_VERBOSE
- See Also:
- Constant Field Values
VERBOSE_LEVEL_DEBUG
public static final java.lang.String VERBOSE_LEVEL_DEBUG
- See Also:
- Constant Field Values
env
private Environment env
EnhancerFilter
public EnhancerFilter(EnhancerMetaData metaData,
java.util.Properties settings,
java.io.PrintWriter out,
java.io.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
init
protected void init(EnhancerMetaData metaData,
java.util.Properties settings,
java.io.PrintWriter out,
java.io.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:
EnhancerUserException
EnhancerFatalError
enhanceClassFile1
private boolean enhanceClassFile1(java.io.InputStream inClassFile,
OutputStreamWrapper outClassFile)
throws EnhancerUserException
- Enhances a given class according to the JDO meta-data.
- Throws:
EnhancerUserException
enhanceClassFile
public boolean enhanceClassFile(java.io.InputStream inClassFile,
OutputStreamWrapper outClassFile)
throws EnhancerUserException,
EnhancerFatalError
- Enhances a given class according to the JDO meta-data.
- Specified by:
enhanceClassFile
in interface ClassFileEnhancer
- Parameters:
inClassFile
- The byte-code of the class to be enhanced.outClassFile
- The byte-code of the enhanced class.
- Returns:
true
if the class has been enhanced,
false
otherwise.
- Throws:
EnhancerUserException
EnhancerFatalError
enhanceClassFile
public boolean enhanceClassFile(java.io.InputStream in,
java.io.OutputStream out)
throws EnhancerUserException,
EnhancerFatalError
- Description copied from interface:
ClassFileEnhancer
- 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.
- Specified by:
enhanceClassFile
in interface ClassFileEnhancer
- Parameters:
in
- The byte-code of the class to be enhanced.out
- The byte-code of the enhanced class.
- Returns:
true
if the class has been enhanced,
false
otherwise.
- Throws:
EnhancerUserException
EnhancerFatalError