|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object orc.Config
public class Config
Class for processing configuration options. Such options could be provided via command line arguments or obtained though environment variables, and could also be read from other sources or hard-coded.
This class uses annotations to map command-line arguments to calls to
setter methods. See processArgs(String[])
.
Constructor Summary | |
---|---|
Config()
|
Method Summary | |
---|---|
void |
addInclude(java.lang.String include)
|
Config |
clone()
|
java.lang.String |
composeCmdLine()
|
java.lang.String |
getClassPath()
|
int |
getDebugLevel()
|
boolean |
getExceptionsOn()
|
java.lang.String |
getIncludePath()
|
java.util.List<java.lang.String> |
getIncludes()
|
java.lang.String |
getInputFilename()
|
java.io.InputStream |
getInputStream()
|
int |
getMaxPubs()
|
CompileMessageRecorder |
getMessageRecorder()
|
java.lang.Boolean |
getNoPrelude()
|
int |
getNumKilimThreads()
|
int |
getNumSiteThreads()
|
java.io.File |
getOilOutputFile()
|
java.io.Reader |
getOilReader()
|
java.io.Writer |
getOilWriter()
|
ProgressListener |
getProgressListener()
|
boolean |
getQuietChecking()
|
java.io.Reader |
getReader()
|
boolean |
getShortErrors()
|
int |
getStackSize()
|
java.io.PrintStream |
getStderr()
|
java.io.PrintStream |
getStdout()
|
TokenPool |
getTokenPool()
|
java.io.File |
getTraceOutputFile()
|
Tracer |
getTracer()
|
boolean |
getTypeChecking()
|
java.lang.Boolean |
hasCapability(java.lang.String name)
Current capabilities include: send mail import java |
boolean |
hasInputFile()
|
boolean |
hasOilInputFile()
|
boolean |
hasOilOutputFile()
|
boolean |
hasTraceOutputFile()
|
void |
inputFromString(java.lang.String source)
|
java.lang.Class |
loadClass(java.lang.String name)
|
boolean |
noExecute()
|
java.io.Reader |
openInclude(java.lang.String name,
java.lang.String relativeTo)
Open an include file. |
void |
printUsage(boolean _)
|
void |
processArgs(java.lang.String[] args)
Set properties based on command-line arguments. |
void |
setCapability(java.lang.String name,
java.lang.Boolean value)
|
void |
setClassPath(java.lang.String classPath)
|
void |
setDebug(boolean debug)
|
void |
setDebugLevel(int debugLevel)
|
void |
setExceptionsOn(boolean exceptionsOn)
|
void |
setIncludePath(java.lang.String includePath)
|
void |
setInputFile(java.io.File file)
|
void |
setMaxPubs(int maxPubs)
|
void |
setMessageRecorder(CompileMessageRecorder messageRecorder)
|
void |
setNoExecute(boolean noExecute)
|
void |
setNoPrelude(boolean noPrelude)
|
void |
setNumSiteThreads(java.lang.Integer v)
|
void |
setOilOutputFile(java.io.File oilOut)
|
void |
setProgressListener(ProgressListener progressListener)
|
void |
setQuietChecking(boolean b)
If the typechecker runs, suppress all its output. |
void |
setShortErrors(boolean b)
The default is long errors. |
void |
setStackSize(int stackSize)
|
void |
setStderr(java.io.PrintStream stderr)
|
void |
setStdout(java.io.PrintStream stdout)
|
void |
setTokenPoolSize(int tokenPoolSize)
|
void |
setTraceOutputFile(java.io.File file)
|
void |
setTracer(Tracer tracer)
Set a custom tracer. |
void |
setTypeChecking(boolean typecheck)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Config()
Method Detail |
---|
public void processArgs(java.lang.String[] args)
public java.lang.String composeCmdLine()
public void printUsage(boolean _) throws org.kohsuke.args4j.CmdLineException
org.kohsuke.args4j.CmdLineException
public void setDebug(boolean debug)
public void setDebugLevel(int debugLevel)
public void setTypeChecking(boolean typecheck)
public void setNoPrelude(boolean noPrelude)
public void setNoExecute(boolean noExecute)
public void setTraceOutputFile(java.io.File file) throws org.kohsuke.args4j.CmdLineException
org.kohsuke.args4j.CmdLineException
public void setOilOutputFile(java.io.File oilOut)
public void setIncludePath(java.lang.String includePath)
public void setClassPath(java.lang.String classPath)
public void setMaxPubs(int maxPubs)
public void setNumSiteThreads(java.lang.Integer v)
public void setInputFile(java.io.File file) throws org.kohsuke.args4j.CmdLineException
org.kohsuke.args4j.CmdLineException
public void inputFromString(java.lang.String source)
public void setExceptionsOn(boolean exceptionsOn)
public void addInclude(java.lang.String include)
public boolean hasInputFile()
public void setShortErrors(boolean b)
public boolean getShortErrors()
public void setQuietChecking(boolean b)
b
- public boolean getQuietChecking()
public void setTracer(Tracer tracer)
public int getDebugLevel()
public CompileMessageRecorder getMessageRecorder()
public void setMessageRecorder(CompileMessageRecorder messageRecorder)
public ProgressListener getProgressListener()
public void setProgressListener(ProgressListener progressListener)
public java.io.File getTraceOutputFile()
public boolean hasTraceOutputFile()
public java.io.File getOilOutputFile()
public boolean hasOilOutputFile()
public boolean hasOilInputFile()
public java.io.Reader getOilReader() throws java.io.IOException
java.io.IOException
public java.io.Writer getOilWriter() throws java.io.IOException
java.io.IOException
public java.lang.Boolean getNoPrelude()
public int getMaxPubs()
public java.io.Reader getReader()
public java.io.InputStream getInputStream()
public Tracer getTracer()
public java.util.List<java.lang.String> getIncludes()
public int getNumKilimThreads()
public int getNumSiteThreads()
public boolean getTypeChecking()
public java.lang.String getInputFilename()
public java.lang.Boolean hasCapability(java.lang.String name)
public void setCapability(java.lang.String name, java.lang.Boolean value)
public java.io.PrintStream getStdout()
public void setStdout(java.io.PrintStream stdout)
public java.io.PrintStream getStderr()
public void setStderr(java.io.PrintStream stderr)
public TokenPool getTokenPool()
public void setTokenPoolSize(int tokenPoolSize)
public int getStackSize()
public void setStackSize(int stackSize)
public java.lang.String getIncludePath()
public java.lang.String getClassPath()
public boolean getExceptionsOn()
public final java.io.Reader openInclude(java.lang.String name, java.lang.String relativeTo) throws java.io.FileNotFoundException
setIncludePath(String)
and then the
package orc.inc. This means you can store include files
as either files or class resources (which will continue to
work when Orc is deployed as a servlet or JAR).
name
- of the include file relative to some directory of include path
or package orc.inc
relativeTo
The path that should be considered the "current directory" if
any include path is relative; typically this is the directory
containing the program file which declared the include.
If null, ignore all relative include paths.
java.io.FileNotFoundException
- if the resource is not found.public final java.lang.Class loadClass(java.lang.String name) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public Config clone()
clone
in class java.lang.Object
public boolean noExecute()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |