public abstract class AbstractScriptGenerator extends Object implements ScriptGenerator
| Modifier and Type | Field and Description |
|---|---|
protected char |
ESC_EOL
The EOL escape character.
|
protected char |
ESC_SPECIAL
The escape character for special characters.
|
protected int |
iArgIndex
The current script-argument-index.
|
protected String |
iIndent
The current indentation-level.
|
protected StringBuilder |
iLineBuffer
The current line-buffer.
|
protected static int |
LINE_SIZE
The maximum linesize.
|
| Constructor and Description |
|---|
AbstractScriptGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
createScript()
Generate the script.
|
Operation |
getOperation()
Return the Operation-object.
|
Properties |
getProperties()
Return the Properties-object.
|
protected String |
getScriptArg(String pToken)
Return the token as a script-argument.
|
protected String |
getSearchPath()
Return the search-path in a plattform-dependent way.
|
PrintWriter |
getWriter()
Return the PrintWriter-object.
|
void |
init(PrintWriter pWriter,
Operation pOp,
Properties pProps)
Intialize the generator.
|
protected String |
quote(String pString)
Quote the given string.
|
protected void |
writeCommand()
Write the ImageCommand to the script-file.
|
protected void |
writeHeader()
Write the header of the script.
|
protected void |
writeOperation()
Write the Operation to the script-file.
|
protected static final int LINE_SIZE
protected char ESC_EOL
protected char ESC_SPECIAL
protected String iIndent
protected StringBuilder iLineBuffer
protected int iArgIndex
public void createScript()
createScript in interface ScriptGeneratorprotected void writeHeader()
protected String getSearchPath()
protected void writeCommand()
protected String getScriptArg(String pToken)
This method must be implemented by subclasses.
protected String quote(String pString)
protected void writeOperation()
public void init(PrintWriter pWriter, Operation pOp, Properties pProps)
init in interface ScriptGeneratorpublic PrintWriter getWriter()
public Operation getOperation()
public Properties getProperties()
Copyright © 2019. All rights reserved.