Class ParserSupports
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.taskdefs.condition.ParserSupports
Test for the XML parser supporting a particular feature
- Since:
- Ant 1.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringerror - combined attributes not allowedstatic final Stringerror - missing attributestatic final Stringerror - no valuestatic final Stringfeaturestatic final Stringerror - not recognizedstatic final Stringerror - not supportedstatic final StringpropertyFields inherited from class ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaneval()Is this condition true?booleanSet a featurebooleanSet a propertyvoidsetFeature(String feature) Feature to probe for.voidsetProperty(String property) Property to probe forvoidOptional value to set.Methods inherited from class ProjectComponent
clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProjectModifier and TypeMethodDescriptionclone()Returns the description of the current action.Returns the file/location where this task was defined.Returns the project to which this component belongs.voidLogs a message with the default (INFO) priority.voidLogs a message with the given priority.voidsetDescription(String desc) Sets a description of the current action.voidsetLocation(Location location) Sets the file/location where this task was defined.voidsetProject(Project project) Sets the project object of this component.
-
Field Details
-
ERROR_BOTH_ATTRIBUTES
-
FEATURE
-
PROPERTY
-
NOT_RECOGNIZED
-
NOT_SUPPORTED
-
ERROR_NO_ATTRIBUTES
-
ERROR_NO_VALUE
-
-
Constructor Details
-
ParserSupports
public ParserSupports()
-
-
Method Details
-
setFeature
Feature to probe for.- Parameters:
feature- the feature to probe for.
-
setProperty
Property to probe for- Parameters:
property- the property to probe for.
-
setValue
Optional value to set. Converted to a boolean value when setting a property- Parameters:
value- the value to set.
-
eval
Is this condition true?.- Specified by:
evalin interfaceCondition- Returns:
- true if the condition is true
- Throws:
BuildException- if an error occurs
-
evalFeature
public boolean evalFeature()Set a feature- Returns:
- true if the feature could be set
-
evalProperty
public boolean evalProperty()Set a property- Returns:
- true if the feature could be set
-