public interface IAntScript
It contains convenience methods for creating the XML elements required for Ant scripts. See the Ant website for more details on Ant scripts and the particular Ant tasks.
Modifier and Type | Method and Description |
---|---|
void |
decrementIdent()
Decrement the nesting level
|
void |
incrementIdent()
Increment the nesting level
|
void |
print(String string)
Print the given string to the Ant script.
|
void |
printAntCallTask(String target,
boolean inheritAll,
Map<String,String> params)
Print an ant call task as defined by AntCall}.
|
void |
printAttribute(String name,
String value,
boolean mandatory)
Print an XML attribute.
|
void |
printComment(String comment)
Print the given comment to the Ant script folled by a carriage-return.
|
void |
printEchoTask(String file,
String message,
String level)
Print an echo task
|
void |
printElement(String tag,
Map<String,String> attributes)
Print an xml element with attributes (
<tagName [attributes...] |
void |
printEndMacroDef()
Print the end of the macro
|
void |
printEndTag(String endTag)
Print tagName as an xml end tag (
</tagName> |
void |
println()
Print a empty line.
|
void |
println(String string)
Print the given string followed by a carriage-return.
|
void |
printMacroDef(String macroName,
List<String> attributes)
Print the beginning of a macro definition
|
void |
printStartTag(String tagName)
Print tagName as an xml begin tag (
<tagName> |
void |
printStartTag(String tag,
Map<String,String> attributes)
Print tagName as an xml begin tag with attributes (
<tagName [attributes...] |
void |
printTabs()
Print as many tabs as current nesting level requires
|
void |
printTargetDeclaration(String name,
String depends,
String ifClause,
String unlessClause,
String description)
Print a target declaration.
|
void |
printTargetEnd()
Print the end tag for a target declaration.
|
void print(String string)
string
- the string to print.void printComment(String comment)
comment
- the comment to print.void println(String string)
string
- the string to print.void println()
void printAntCallTask(String target, boolean inheritAll, Map<String,String> params)
target
- the target executed by the call. This value can not be null
.inheritAll
- If true, pass all properties to the new Ant project.params
- Specifies as key / value pairs, the properties to set before running the specified target. This value can be null
void printAttribute(String name, String value, boolean mandatory)
name=value
.name
- the name of the attribute to print. This value can not be null
.value
- the name of the value to print. This value can be null
.mandatory
- indicate whether or not the value is mandatory.
If the value
is null
and the attribute is mandatory, the printed value will be "".void printStartTag(String tagName)
<tagName>).
tagName
- the tag to print.void printStartTag(String tag, Map<String,String> attributes)
<tagName [attributes...] >).
tag
- attributes
- void printEndTag(String endTag)
</tagName>).
endTag
- the tag to print.void printElement(String tag, Map<String,String> attributes)
<tagName [attributes...] />).
tag
- attributes
- void printTabs()
void incrementIdent()
void decrementIdent()
void printTargetDeclaration(String name, String depends, String ifClause, String unlessClause, String description)
name
- the name of the target. This value can not be null
.depends
- a comma-separated list of names of targets on which this target depends. This value can be null
.ifClause
- the name of the property that must be set in order for this target to execute. This value can be null
unlessClause
- the name of the property that must not be set in order for this target to execute. This value can be null
description
- a short description of this target's function. This value can be null
void printTargetEnd()
void printEchoTask(String file, String message, String level)
file
- - file to write the message to (or null)message
- - the message to echolevel
- - the level to report the message (ie, "error", "warning", "info"), "warning" is the default if null is passed.void printMacroDef(String macroName, List<String> attributes)
macroName
- attributes
- void printEndMacroDef()
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.