Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs.optional.extension

public Class ExtensionSet

extends DataType
Class Inheritance
Imports
java.util.ArrayList, .Arrays, .List, .Stack, org.apache.tools.ant.BuildException, .Project, org.apache.tools.ant.types.DataType, .FileSet, .Reference

The Extension set lists a set of "Optional Packages" / "Extensions".

Field Summary

Modifier and TypeField and Description
private final List<ExtensionAdapter>
extensions

ExtensionAdapter objects representing extensions.

private final List<FileSet>
extensionsFilesets

Filesets specifying all the extensions wanted.

Inherited from org.apache.tools.ant.types.DataType:
checkedref

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addExtension(final ExtensionAdapter
an extension that this library requires.
extensionAdapter
)

Adds an extension that this library requires.

public void
addFileset(final FileSet
a set of files about which extensions data will be extracted.
fileSet
)

Adds a set of files about which extensions data will be extracted.

public void
addLibfileset(final LibFileSet
a set of files about which extensions data will be extracted.
fileSet
)

Adds a set of files about which extensions data will be extracted.

protected synchronized void
dieOnCircularReference(Stack<Object>
the stack of references to check.
stk
,
Project
the project to use to dereference the references.
p
)

Overrides org.apache.tools.ant.types.DataType.dieOnCircularReference.

Check to see whether any DataType we hold references to is included in the Stack (which holds all DataType instances that directly or indirectly reference this instance, including this instance itself).
private ExtensionSet
public void
setRefid(final Reference
the reference to which this instance is associated
reference
)

Overrides org.apache.tools.ant.types.DataType.setRefid.

Makes this instance in effect a reference to another ExtensionSet instance.
public Extension[]

Returns:

an array containing the Extensions from this set
toExtensions
(final Project
the project instance.
proj
)

Extract a set of Extension objects from the ExtensionSet.

public String

Returns:

the extensions in a string.
toString
()

Overrides org.apache.tools.ant.types.DataType.toString.

Basic DataType toString().
Inherited from org.apache.tools.ant.types.DataType:
checkAttributesAllowedcheckChildrenAllowedcircularReferenceclonedieOnCircularReferencedieOnCircularReferencegetCheckedRefgetCheckedRefgetCheckedRefgetCheckedRefgetCheckedRefgetDataTypeNamegetRefidinvokeCircularReferenceCheckisCheckedisReferencenoChildrenAllowedpushAndInvokeCircularReferenceChecksetCheckedtooManyAttributes

Field Detail

extensionsback to summary
private final List<ExtensionAdapter> extensions

ExtensionAdapter objects representing extensions.

extensionsFilesetsback to summary
private final List<FileSet> extensionsFilesets

Filesets specifying all the extensions wanted.

Constructor Detail

ExtensionSetback to summary
public ExtensionSet()

Method Detail

addExtensionback to summary
public void addExtension(final ExtensionAdapter extensionAdapter)

Adds an extension that this library requires.

Parameters
extensionAdapter:ExtensionAdapter

an extension that this library requires.

addFilesetback to summary
public void addFileset(final FileSet fileSet)

Adds a set of files about which extensions data will be extracted.

Parameters
fileSet:FileSet

a set of files about which extensions data will be extracted.

addLibfilesetback to summary
public void addLibfileset(final LibFileSet fileSet)

Adds a set of files about which extensions data will be extracted.

Parameters
fileSet:LibFileSet

a set of files about which extensions data will be extracted.

dieOnCircularReferenceback to summary
protected synchronized void dieOnCircularReference(Stack<Object> stk, Project p) throws BuildException

Overrides org.apache.tools.ant.types.DataType.dieOnCircularReference.

Doc from org.apache.tools.ant.types.DataType.dieOnCircularReference.

Check to see whether any DataType we hold references to is included in the Stack (which holds all DataType instances that directly or indirectly reference this instance, including this instance itself).

If one is included, throw a BuildException created by circularReference.

This implementation is appropriate only for a DataType that cannot hold other DataTypes as children.

The general contract of this method is that it shouldn't do anything if checked is true and set it to true on exit.

Parameters
stk:Stack<Object>

the stack of references to check.

p:Project

the project to use to dereference the references.

Annotations
@Override
Exceptions
BuildException:
on error.
getRefback to summary
private ExtensionSet getRef()
setRefidback to summary
public void setRefid(final Reference reference) throws BuildException

Overrides org.apache.tools.ant.types.DataType.setRefid.

Makes this instance in effect a reference to another ExtensionSet instance.

You must not set another attribute or nest elements inside this element if you make it a reference.

Parameters
reference:Reference

the reference to which this instance is associated

Annotations
@Override
Exceptions
BuildException:
if this instance already has been configured.
toExtensionsback to summary
public Extension[] toExtensions(final Project proj) throws BuildException

Extract a set of Extension objects from the ExtensionSet.

Parameters
proj:Project

the project instance.

Returns:Extension[]

an array containing the Extensions from this set

Exceptions
BuildException:
if an error occurs
toStringback to summary
public String toString()

Overrides org.apache.tools.ant.types.DataType.toString.

Doc from org.apache.tools.ant.types.DataType.toString.

Basic DataType toString().

Returns:String

the extensions in a string.

Annotations
@Override
See Also
java.lang.Object#toString()