public class SourceWriter extends Object
Constructor and Description |
---|
SourceWriter(Jiffle.RuntimeModel model) |
Modifier and Type | Method and Description |
---|---|
SourceWriter |
append(Node node) |
SourceWriter |
append(String text)
Method to add text in the source, without any indentation or newline
|
void |
dec()
Decreases indentation by one indentation step, or reduce indentation to zero otherwise
|
String |
getBaseClassName() |
Jiffle.RuntimeModel |
getRuntimeModel() |
String |
getScript() |
String |
getSource()
Returns the source code built so far
|
void |
inc()
Increases indentation by one indentation step
|
SourceWriter |
indent() |
boolean |
isInternalBaseClass()
Returns true if the runtime is either
AbstractDirectRuntime
or AbstractIndirectRuntime |
SourceWriter |
line(String line)
Method to add a line in the source code.
|
void |
newLine() |
void |
setBaseClassName(String baseClassName) |
void |
setScript(String script) |
String |
writeToString(Expression node)
Writes out a node to a SourceWriter and returns the resulting script
|
public SourceWriter(Jiffle.RuntimeModel model)
public Jiffle.RuntimeModel getRuntimeModel()
public String writeToString(Expression node)
node
- public void inc()
public void dec()
public SourceWriter line(String line)
line
- public SourceWriter append(String text)
line
- public String getSource()
public void newLine()
public SourceWriter indent()
public SourceWriter append(Node node)
public void setScript(String script)
public String getScript()
public void setBaseClassName(String baseClassName)
public String getBaseClassName()
public boolean isInternalBaseClass()
AbstractDirectRuntime
or AbstractIndirectRuntime
Copyright © 2006–2018 GeoSolutions. All rights reserved.