public static final class TargetLister.Target extends Object
Modifier and Type | Method and Description |
---|---|
Element |
getElement()
Gets the XML element that defines the target.
|
String |
getName()
Gets the simple name of the target.
|
AntProjectCookie |
getOriginatingScript()
Gets the Ant script originally scanned for targets.
|
String |
getQualifiedName()
Gets the qualified name of the target.
|
AntProjectCookie |
getScript()
Gets the actual Ant script this target was found in.
|
boolean |
isDefault()
Tests whether this target is the default for the main script.
|
boolean |
isDescribed()
Tests whether this target has a description.
|
boolean |
isInternal()
Tests whether a target is marked as internal to the script.
|
boolean |
isOverridden()
Tests whether this target is overridden in an importing script.
|
String |
toString() |
public String getName()
name
attribute.public String getQualifiedName()
depends
attribute to
distinguish an imported target from a target of the same name in the
importing script.public Element getElement()
target
public AntProjectCookie getScript()
TargetLister.Target.getElement()
should be owned by AntProjectCookie.getDocument()
.public AntProjectCookie getOriginatingScript()
TargetLister.getTargets(org.apache.tools.ant.module.api.AntProjectCookie)
yourself,
but is useful in case someone else did and is providing a Target
in some action context.TargetLister.getTargets(org.apache.tools.ant.module.api.AntProjectCookie)
public boolean isDescribed()
description
attribute in XML.
Typically, targets with descriptions are intended to be exposed to the
user of the script, whereas undescribed targets may not be intended
for general use. However not all script authors use descriptions, so
described targets should only be given UI precedence.public boolean isInternal()
public boolean isOverridden()
TargetLister.Target.getQualifiedName()
).
Note that this flag may be true when asked of a TargetLister.Target
gotten
via the importing script, while false when asked of the same target
gotten directly from the imported script, since the meaning is dependent
on the import chain.public boolean isDefault()
default
attribute in an imported script is ignored.
However the default target might come from an imported script.