public class Scriptlet extends Object
getSubpackage() and getProgram(). The (optional) contents
can be provided by either getScript() or getScriptFile().| Constructor and Description |
|---|
Scriptlet() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
buildScriptletLine(String directive)
Builds the scriptlet line including any optional args.
|
String |
getFileEncoding()
The encoding to use to read
getScriptFile(). |
String |
getProgram()
The program to use to execute the script.
|
String |
getScript()
The contents of the script as a
String. |
File |
getScriptFile()
The contents of the script as a
File. |
String |
getSubpackage()
The optional subpackage.
|
void |
setFileEncoding(String fileEncoding) |
void |
setProgram(String program) |
void |
setScript(String script) |
void |
setScriptFile(File scriptFile) |
void |
setSourceEncoding(String sourceEncoding)
This is the maven property: project.build.sourceEncoding
|
void |
setSubpackage(String subpackage) |
String |
toString() |
protected void |
write(PrintWriter writer,
String directive)
Writes the scriptlet.
|
protected void |
writeContent(PrintWriter writer)
Writes the content (either
getScript() or getScriptFile()) to writer. |
public String getSubpackage()
subpackage.public void setSubpackage(String subpackage)
subpackage - The subpackage to set.public String getProgram()
program.public String getScript()
String. This value will override anything at getScriptFile().script.public File getScriptFile()
File. This will be ignored if getScript() is populated.scriptFile.public void setScriptFile(File scriptFile)
scriptFile - The scriptFile to set.public String getFileEncoding()
getScriptFile(). If null, the default character encoding for th
platform will be used.fileEncoding.public void setFileEncoding(String fileEncoding)
fileEncoding - The fileEncoding to set.public void setSourceEncoding(String sourceEncoding)
soruceEncoding - The sourceEncoding to set.protected final void write(PrintWriter writer, String directive) throws IOException
writer - PrintWriter to write content to.directive - The directive for the scriptlet.IOExceptionprotected String buildScriptletLine(String directive)
directive - The directive for the scriptlet.protected final void writeContent(PrintWriter writer) throws IOException
getScript() or getScriptFile()) to writer.writer - PrintWriter to write content to.IOExceptionCopyright © 2005–2014 Codehaus. All rights reserved.