Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs.condition

public Class ParserSupports

extends ProjectComponent
implements Condition
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.taskdefs.condition.Condition
Imports
org.apache.tools.ant.BuildException, .Project, .ProjectComponent, org.apache.tools.ant.util.JAXPUtils, org.xml.sax.SAXNotRecognizedException, .SAXNotSupportedException, .XMLReader

Test for the XML parser supporting a particular feature
Since
Ant 1.7

Field Summary

Modifier and TypeField and Description
public static final String
ERROR_BOTH_ATTRIBUTES

error - combined attributes not allowed

public static final String
ERROR_NO_ATTRIBUTES

error - missing attribute

public static final String
ERROR_NO_VALUE

error - no value

public static final String
FEATURE

feature

private String
public static final String
NOT_RECOGNIZED

error - not recognized

public static final String
NOT_SUPPORTED

error - not supported

public static final String
PROPERTY

property

private String
private String
Inherited from org.apache.tools.ant.ProjectComponent:
descriptionlocationproject

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
eval()

Implements org.apache.tools.ant.taskdefs.condition.Condition.eval.

Is this condition true?.
public boolean

Returns:

true if the feature could be set
evalFeature
()

Set a feature

public boolean

Returns:

true if the feature could be set
evalProperty
()

Set a property

private XMLReader

Returns:

a reader
getReader
()

Get our reader

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

Feature to probe for.

public void
setProperty(String
the property to probe for.
property
)

Property to probe for

public void
setValue(String
the value to set.
value
)

Optional value to set.

Inherited from org.apache.tools.ant.ProjectComponent:
clonegetDescriptiongetLocationgetProjectloglogsetDescriptionsetLocationsetProject

Field Detail

ERROR_BOTH_ATTRIBUTESback to summary
public static final String ERROR_BOTH_ATTRIBUTES

error - combined attributes not allowed

ERROR_NO_ATTRIBUTESback to summary
public static final String ERROR_NO_ATTRIBUTES

error - missing attribute

ERROR_NO_VALUEback to summary
public static final String ERROR_NO_VALUE

error - no value

FEATUREback to summary
public static final String FEATURE

feature

featureback to summary
private String feature
NOT_RECOGNIZEDback to summary
public static final String NOT_RECOGNIZED

error - not recognized

NOT_SUPPORTEDback to summary
public static final String NOT_SUPPORTED

error - not supported

PROPERTYback to summary
public static final String PROPERTY

property

propertyback to summary
private String property
valueback to summary
private String value

Constructor Detail

ParserSupportsback to summary
public ParserSupports()

Method Detail

evalback to summary
public boolean eval() throws BuildException

Implements org.apache.tools.ant.taskdefs.condition.Condition.eval.

Doc from org.apache.tools.ant.taskdefs.condition.Condition.eval.

Is this condition true?.

Returns:boolean

true if the condition is true

Annotations
@Override
Exceptions
BuildException:
if an error occurs
evalFeatureback to summary
public boolean evalFeature()

Set a feature

Returns:boolean

true if the feature could be set

evalPropertyback to summary
public boolean evalProperty()

Set a property

Returns:boolean

true if the feature could be set

getReaderback to summary
private XMLReader getReader()

Get our reader

Returns:XMLReader

a reader

setFeatureback to summary
public void setFeature(String feature)

Feature to probe for.

Parameters
feature:String

the feature to probe for.

setPropertyback to summary
public void setProperty(String property)

Property to probe for

Parameters
property:String

the property to probe for.

setValueback to summary
public void setValue(String value)

Optional value to set. Converted to a boolean value when setting a property

Parameters
value:String

the value to set.