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
Modifier and TypeFieldDescriptionstatic final String
error - combined attributes not allowedstatic final String
error - missing attributestatic final String
error - no valuestatic final String
featurestatic final String
error - not recognizedstatic final String
error - not supportedstatic final String
propertyFields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
eval()
Is this condition true?boolean
Set a featureboolean
Set a propertyvoid
setFeature
(String feature) Feature to probe for.void
setProperty
(String property) Property to probe forvoid
Optional value to set.Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
-
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:
eval
in 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
-