Top Description Fields Constructors Methods
org.apache.tools.ant.attribute

public abstract Class BaseIfAttribute

extends ProjectComponent
implements EnableAttribute
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.attribute.EnableAttribute
Known Direct Subclasses
org.apache.tools.ant.attribute.IfBlankAttribute, org.apache.tools.ant.attribute.IfSetAttribute, org.apache.tools.ant.attribute.IfTrueAttribute
Imports
java.util.Map, java.util.stream.Collectors, org.apache.tools.ant.ProjectComponent, .UnknownElement

An abstract class for if/unless attributes. This contains a boolean flag to specify whether this is an if or unless attribute.
Since
Ant 1.9.1

Field Summary

Modifier and TypeField and Description
private boolean
Inherited from org.apache.tools.ant.ProjectComponent:
descriptionlocationproject

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected boolean

Returns:

val if positive or !val if not.
convertResult
(boolean
the result to convert
val
)

convert the result.

protected Map<String, String>

Returns:

a map of attributes.
getParams
(UnknownElement
the element this attribute is in.
el
)

Get all the attributes in the ant-attribute:param namespace and place them in a map.

protected boolean

Returns:

the flag.
isPositive
()

Get the positive flag.

protected void
setPositive(boolean
the value to use.
positive
)

Set the positive flag.

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

Field Detail

positiveback to summary
private boolean positive

Constructor Detail

BaseIfAttributeback to summary
public BaseIfAttribute()

Method Detail

convertResultback to summary
protected boolean convertResult(boolean val)

convert the result.

Parameters
val:boolean

the result to convert

Returns:boolean

val if positive or !val if not.

getParamsback to summary
protected Map<String, String> getParams(UnknownElement el)

Get all the attributes in the ant-attribute:param namespace and place them in a map.

Parameters
el:UnknownElement

the element this attribute is in.

Returns:Map<String, String>

a map of attributes.

isPositiveback to summary
protected boolean isPositive()

Get the positive flag.

Returns:boolean

the flag.

setPositiveback to summary
protected void setPositive(boolean positive)

Set the positive flag.

Parameters
positive:boolean

the value to use.