A
- The language adapter classpublic abstract class ProgramBase<A extends LanguageAdapter> extends Object implements Program
Modifier and Type | Field and Description |
---|---|
protected A |
adapter
The language adapter.
|
protected Executable |
executable
The executable.
|
protected boolean |
isScriptlet
Whether the source code is a scriptlet.
|
protected int |
position
The program's position in the executable.
|
protected String |
sourceCode
The source code.
|
protected int |
startColumnNumber
The column number in the document for where the program's source code
begins.
|
protected int |
startLineNumber
The line number in the document for where the program's source code
begins.
|
Constructor and Description |
---|
ProgramBase(String sourceCode,
boolean isScriptlet,
int position,
int startLineNumber,
int startColumnNumber,
Executable executable,
A adapter)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getSourceCode()
The source code.
|
void |
prepare()
The optional "preparation" sub-phase is intended to speed up usage of
later phases at the expense of higher cost during creation.
|
protected final String sourceCode
protected final boolean isScriptlet
protected final int position
protected final int startLineNumber
protected final int startColumnNumber
protected final Executable executable
protected final A extends LanguageAdapter adapter
public ProgramBase(String sourceCode, boolean isScriptlet, int position, int startLineNumber, int startColumnNumber, Executable executable, A adapter)
sourceCode
- The source codeisScriptlet
- Whether the source code is a scriptletposition
- The program's position in the executablestartLineNumber
- The line number in the document for where the program's source
code beginsstartColumnNumber
- The column number in the document for where the program's source
code beginsexecutable
- The executableadapter
- The language adapterpublic String getSourceCode()
Program
getSourceCode
in interface Program
public void prepare() throws PreparationException
Program
prepare
in interface Program
PreparationException
- In case of a preparation errorCopyright © 2009-2015 Three Crickets LLC.