|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jdo.impl.enhancer.util.Assertion
org.apache.jdo.impl.enhancer.util.Support
org.apache.jdo.impl.enhancer.GenericMain
org.apache.jdo.impl.enhancer.ClassArgMain
public class ClassArgMain
Base class for JDO command line enhancer and tests.
Field Summary | |
---|---|
protected PathResourceLocator |
classes
The locator for classes. |
protected java.io.PrintWriter |
err
The stream to write error messages to. |
protected ClassArgOptions |
options
The options and arguments. |
protected java.io.PrintWriter |
out
The stream to write messages to. |
Fields inherited from class org.apache.jdo.impl.enhancer.GenericMain |
---|
INTERNAL_ERROR, OK, USAGE_ERROR, USER_EXCEPTION |
Fields inherited from class org.apache.jdo.impl.enhancer.util.Support |
---|
timer |
Constructor Summary | |
---|---|
ClassArgMain(java.io.PrintWriter out,
java.io.PrintWriter err)
Creates an instance. |
|
ClassArgMain(java.io.PrintWriter out,
java.io.PrintWriter err,
ClassArgOptions options)
Creates an instance. |
Method Summary | |
---|---|
protected void |
closeInputStream(java.io.InputStream in)
Closes an input stream. |
protected void |
flush()
Flushes streams. |
protected static java.lang.String |
getClassFileName(java.lang.String className)
Returns the file name for a class name. |
protected void |
init()
Initializes all components. |
protected void |
initClassLocator()
Initializes the class locator. |
static void |
main(java.lang.String[] args)
Runs this class |
protected java.io.InputStream |
openClassInputStream(java.lang.String className)
Opens an input stream for the given classname. |
protected java.io.InputStream |
openFileInputStream(java.lang.String fileName)
Opens an input stream for the given filename |
protected void |
print(java.lang.String msg)
Prints out a message. |
protected void |
println()
Prints out a message. |
protected void |
println(java.lang.String msg)
Prints out a message. |
protected void |
printlnErr()
Prints out an error message. |
protected void |
printlnErr(java.lang.String msg)
Prints out an error message. |
protected void |
printlnErr(java.lang.String msg,
java.lang.Throwable ex)
Prints out an error message. |
protected void |
printlnErr(java.lang.String msg,
java.lang.Throwable ex,
boolean verbose)
Prints out an error message. |
Methods inherited from class org.apache.jdo.impl.enhancer.GenericMain |
---|
process, run |
Methods inherited from class org.apache.jdo.impl.enhancer.util.Support |
---|
getI18N, getI18N, getI18N, getI18N, getI18N, getI18N |
Methods inherited from class org.apache.jdo.impl.enhancer.util.Assertion |
---|
affirm, affirm, affirm, affirm |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ClassArgOptions options
protected PathResourceLocator classes
protected final java.io.PrintWriter out
protected final java.io.PrintWriter err
Constructor Detail |
---|
public ClassArgMain(java.io.PrintWriter out, java.io.PrintWriter err)
public ClassArgMain(java.io.PrintWriter out, java.io.PrintWriter err, ClassArgOptions options)
Method Detail |
---|
protected void initClassLocator() throws java.io.IOException
java.io.IOException
protected void init() throws EnhancerFatalError, EnhancerUserException
init
in class GenericMain
EnhancerFatalError
EnhancerUserException
protected static java.lang.String getClassFileName(java.lang.String className)
'.'
by '/'
.
className
- the classname
protected java.io.InputStream openFileInputStream(java.lang.String fileName) throws java.io.FileNotFoundException
fileName
- the name of the file
java.io.FileNotFoundException
- if the file could not be foundprotected java.io.InputStream openClassInputStream(java.lang.String className) throws java.io.IOException
className
- the name of the class (dot-notation)
java.io.IOException
- if an I/O error occuredprotected void closeInputStream(java.io.InputStream in)
in
- the input streampublic static void main(java.lang.String[] args)
protected void printlnErr(java.lang.String msg, java.lang.Throwable ex, boolean verbose)
protected void printlnErr(java.lang.String msg, java.lang.Throwable ex)
protected void printlnErr(java.lang.String msg)
protected void printlnErr()
protected void print(java.lang.String msg)
protected void println(java.lang.String msg)
protected void println()
protected void flush()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |