com.triactive.jdo.enhance
Class ReferenceEnhancer
java.lang.Object
com.triactive.jdo.enhance.Enhancer
com.triactive.jdo.enhance.ReferenceEnhancer
- Direct Known Subclasses:
- ApacheReferenceEnhancer, SunReferenceEnhancer
- public abstract class ReferenceEnhancer
- extends Enhancer
An implementation of Enhancer that wraps the JDO Reference Implementation
enhancer.
This class performs a minimal transformation on the command-line arguments
and then invokes the reference enhancer.
It works with either the old RI enhancer (com.sun.jdori) or the newer one
(org.apache.jdo).
- Author:
- Mike Martin
Field Summary |
protected java.lang.String |
destDir
|
protected java.util.Collection |
jdoFiles
|
protected java.lang.String |
srcPath
|
protected boolean |
verbose
|
Method Summary |
protected int |
callExternalEnhancer(java.lang.String[] classNames)
Called by the superclass enhance() method to enhance a list of classes. |
protected abstract int |
callReferenceEnhancer(java.lang.String[] args)
Called to invoke the underlying reference enhancer. |
protected int |
enhance(java.lang.String[] args)
Runs the reference enhancer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
srcPath
protected java.lang.String srcPath
destDir
protected java.lang.String destDir
verbose
protected boolean verbose
jdoFiles
protected java.util.Collection jdoFiles
ReferenceEnhancer
public ReferenceEnhancer()
enhance
protected int enhance(java.lang.String[] args)
throws java.lang.Exception
- Runs the reference enhancer.
The args array is a list of command-line options and JDO metadata files.
Command-line options:
-l file
Writes a list of the enhanced class names to file.
"-" writes to System.out.
-s path
Source path for .jdo and .class files. Defaults to destination
directory.
-d dir
Destination directory for output files.
-v
Print verbose messages
- Parameters:
args
- A list of command-line options and JDO metadata files (*.jdo files).
- Throws:
java.lang.Exception
callExternalEnhancer
protected int callExternalEnhancer(java.lang.String[] classNames)
throws java.lang.Exception
- Called by the superclass enhance() method to enhance a list of classes.
This juggles the selected options and the passed class names to produce
a suitable list of string arguments for the reference enhancer, then
invokes it.
- Specified by:
callExternalEnhancer
in class Enhancer
- Parameters:
classNames
- The list of class names to be enhanced.
- Throws:
java.lang.Exception
callReferenceEnhancer
protected abstract int callReferenceEnhancer(java.lang.String[] args)
throws java.lang.Exception
- Called to invoke the underlying reference enhancer.
- Parameters:
args
- A list of command-line arguments to the reference enhancer.
- Throws:
java.lang.Exception
Copyright © 2001-2007 The TJDO Project All Rights Reserved.