|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.sim.parameter.rpl.RPLCompiler
public class RPLCompiler
Compiler for RPL format parameter files. The compiler works in two steps, preProcess and compile. The final output is the top-level "main" parameter of which all other parameters are children. This main RPLParameter is used by RPLParameterSetter to set actual model parameters.
| Constructor Summary | |
|---|---|
RPLCompiler(java.lang.String file)
Creates a RPLCompiler for compiling the specified file. |
|
| Method Summary | |
|---|---|
void |
compile(SimModel model)
Performs the actual compilation turning the rpl format file into RPLParameters. |
CompilerException |
createCompilerException(java.lang.String message,
int lineNumber)
|
CompilerException |
createCompilerException(java.lang.String message,
int lineNumber,
java.lang.Exception e)
|
java.util.Set |
getConstNames()
Gets the set of constant parameter names defined during compilation. |
RPLParameter |
getMain()
Gets the "main" RPLParameter produced by this compiler. |
java.util.Set |
getParamNames()
Gets the set of parameter names defined during compilation. |
void |
preProcess()
Performs an initial first passs compilation on the file specified on the constructor. |
void |
setModel(SimModel model)
Sets the model associated with this RPLCompiler. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RPLCompiler(java.lang.String file)
file - the name of the file to compile| Method Detail |
|---|
public void preProcess()
throws java.io.IOException
java.io.IOException - when encountering a problem with the file specified
in the constructor.
public void compile(SimModel model)
throws java.io.IOException
preProcess has not been called before this is called, then preProcess
will be called here. A reference to a model is necessary here as the
rpl format permits references to a model's static fields.
model - the model for which this compiler is compiling parameters
java.io.IOException - when encountering a problem with the file specified
in the constructor.public void setModel(SimModel model)
model - the model associated with this RPLCompiler.public RPLParameter getMain()
compile has been called.
public java.util.Set getParamNames()
public java.util.Set getConstNames()
public CompilerException createCompilerException(java.lang.String message,
int lineNumber)
public CompilerException createCompilerException(java.lang.String message,
int lineNumber,
java.lang.Exception e)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||