public class ClassArgMain extends GenericMain
Modifier and Type | Field and Description |
---|---|
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.
|
INTERNAL_ERROR, OK, USAGE_ERROR, USER_EXCEPTION
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
process, run
getI18N, getI18N, getI18N, getI18N, getI18N, getI18N
protected ClassArgOptions options
protected PathResourceLocator classes
protected final java.io.PrintWriter out
protected final java.io.PrintWriter err
public ClassArgMain(java.io.PrintWriter out, java.io.PrintWriter err)
public ClassArgMain(java.io.PrintWriter out, java.io.PrintWriter err, ClassArgOptions options)
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 classnameprotected java.io.InputStream openFileInputStream(java.lang.String fileName) throws java.io.FileNotFoundException
fileName
- the name of the filejava.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()
Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.