Class ParserSupports
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.taskdefs.condition.ParserSupports
-
- All Implemented Interfaces:
java.lang.Cloneable
,Condition
public class ParserSupports extends ProjectComponent implements Condition
Test for the XML parser supporting a particular feature- Since:
- Ant 1.7
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ERROR_BOTH_ATTRIBUTES
error - combined attributes not allowedstatic java.lang.String
ERROR_NO_ATTRIBUTES
error - missing attributestatic java.lang.String
ERROR_NO_VALUE
error - no valuestatic java.lang.String
FEATURE
featurestatic java.lang.String
NOT_RECOGNIZED
error - not recognizedstatic java.lang.String
NOT_SUPPORTED
error - not supportedstatic java.lang.String
PROPERTY
property-
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
-
Constructor Summary
Constructors Constructor Description ParserSupports()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
eval()
Is this condition true?boolean
evalFeature()
Set a featureboolean
evalProperty()
Set a propertyvoid
setFeature(java.lang.String feature)
Feature to probe for.void
setProperty(java.lang.String property)
Property to probe forvoid
setValue(java.lang.String value)
Optional value to set.-
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
-
-
-
-
Field Detail
-
ERROR_BOTH_ATTRIBUTES
public static final java.lang.String ERROR_BOTH_ATTRIBUTES
error - combined attributes not allowed- See Also:
- Constant Field Values
-
FEATURE
public static final java.lang.String FEATURE
feature- See Also:
- Constant Field Values
-
PROPERTY
public static final java.lang.String PROPERTY
property- See Also:
- Constant Field Values
-
NOT_RECOGNIZED
public static final java.lang.String NOT_RECOGNIZED
error - not recognized- See Also:
- Constant Field Values
-
NOT_SUPPORTED
public static final java.lang.String NOT_SUPPORTED
error - not supported- See Also:
- Constant Field Values
-
ERROR_NO_ATTRIBUTES
public static final java.lang.String ERROR_NO_ATTRIBUTES
error - missing attribute- See Also:
- Constant Field Values
-
ERROR_NO_VALUE
public static final java.lang.String ERROR_NO_VALUE
error - no value- See Also:
- Constant Field Values
-
-
Method Detail
-
setFeature
public void setFeature(java.lang.String feature)
Feature to probe for.- Parameters:
feature
- the feature to probe for.
-
setProperty
public void setProperty(java.lang.String property)
Property to probe for- Parameters:
property
- the property to probe for.
-
setValue
public void setValue(java.lang.String value)
Optional value to set. Converted to a boolean value when setting a property- Parameters:
value
- the value to set.
-
eval
public boolean eval() throws BuildException
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
-
-