org.apache.tools.ant.taskdefs.condition

Class ParserSupports

public class ParserSupports extends ProjectComponent implements Condition

Test for the XML parser supporting a particular feature

Since: Ant 1.7

Field Summary
static StringERROR_BOTH_ATTRIBUTES
error - combined attributes not allowed
static StringERROR_NO_ATTRIBUTES
error - missing attribute
static StringERROR_NO_VALUE
error - no value
static StringFEATURE
feature
static StringNOT_RECOGNIZED
error - not recognized
static StringNOT_SUPPORTED
error - not supported
static StringPROPERTY
property
Method Summary
booleaneval()
{@inheritDoc}.
booleanevalFeature()
Set a feature
booleanevalProperty()
Set a property
voidsetFeature(String feature)
Feature to probe for.
voidsetProperty(String property)
Property to probe for
voidsetValue(String value)
Optional value to set.

Field Detail

ERROR_BOTH_ATTRIBUTES

public static final String ERROR_BOTH_ATTRIBUTES
error - combined attributes not allowed

ERROR_NO_ATTRIBUTES

public static final String ERROR_NO_ATTRIBUTES
error - missing attribute

ERROR_NO_VALUE

public static final String ERROR_NO_VALUE
error - no value

FEATURE

public static final String FEATURE
feature

NOT_RECOGNIZED

public static final String NOT_RECOGNIZED
error - not recognized

NOT_SUPPORTED

public static final String NOT_SUPPORTED
error - not supported

PROPERTY

public static final String PROPERTY
property

Method Detail

eval

public boolean eval()
{@inheritDoc}.

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

setFeature

public void setFeature(String feature)
Feature to probe for.

Parameters: feature the feature to probe for.

setProperty

public void setProperty(String property)
Property to probe for

Parameters: property the property to probe for.

setValue

public void setValue(String value)
Optional value to set. Converted to a boolean value when setting a property

Parameters: value the value to set.