Package org.apache.tools.ant.types
Class FilterSet
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
org.apache.tools.ant.types.FilterSet
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classIndividual filter component of filterset.classThe filtersfile nested element.static classEnumeratedAttribute to set behavior WRT missing filtersfiles: "fail" (default), "warn", "ignore".
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringThe default token end stringstatic final StringThe default token start stringFields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddConfiguredFilterSet(FilterSet filterSet) Add a Filterset to this filter set.voidaddConfiguredPropertySet(PropertySet propertySet) Adds the properties provided by the specified PropertySet to this filterset.voidAdd a new filter made from the given token and value.voidaddFilter(FilterSet.Filter filter) Add a new filter.clone()Clone the filterset.Create a new FiltersFile.Get the begin token for this filterset.Get the end token for this filterset.Gets the filter hash of the FilterSet.protected Vector<FilterSet.Filter> Get the filters in the filter set.Get the onMissingFiltersFile setting.protected FilterSetgetRef()Get the referenced filter set.booleanTest to see if this filter set has filters.booleanGet whether recursive token expansion is enabled.voidreadFiltersFromFile(File filtersFile) Read the filters from the given file.replaceTokens(String line) Does replacement on the given string with token matching.voidsetBeginToken(String startOfToken) Set the string used to id the beginning of a token.voidsetEndToken(String endOfToken) Set the string used to id the end of a token.voidsetFiltersfile(File filtersFile) Set the file containing the filters for this filterset.voidsetOnMissingFiltersFile(FilterSet.OnMissing onMissingFiltersFile) Set the behavior WRT missing filtersfiles.voidsetRecurse(boolean recurse) Set whether recursive token expansion is enabled.Methods inherited from class org.apache.tools.ant.types.DataTypecheckAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, setRefid, tooManyAttributes, toStringMethods inherited from class org.apache.tools.ant.ProjectComponentgetDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
- 
Field Details- 
DEFAULT_TOKEN_START
- 
DEFAULT_TOKEN_END
 
- 
- 
Constructor Details- 
FilterSetpublic FilterSet()Default constructor.
- 
FilterSetCreate a Filterset from another filterset.- Parameters:
- filterset- the filterset upon which this filterset will be based.
 
 
- 
- 
Method Details- 
getFiltersGet the filters in the filter set.- Returns:
- a Vector of Filter instances.
 
- 
getRefGet the referenced filter set.- Returns:
- the filterset from the reference.
 
- 
getFilterHash
- 
setFiltersfileSet the file containing the filters for this filterset.- Parameters:
- filtersFile- sets the filter file from which to read filters for this filter set.
- Throws:
- BuildException- if there is an error.
 
- 
setBeginTokenSet the string used to id the beginning of a token.- Parameters:
- startOfToken- The new Begintoken value.
 
- 
getBeginTokenGet the begin token for this filterset.- Returns:
- the filter set's begin token for filtering.
 
- 
setEndTokenSet the string used to id the end of a token.- Parameters:
- endOfToken- The new Endtoken value.
 
- 
getEndTokenGet the end token for this filterset.- Returns:
- the filter set's end token for replacement delimiting.
 
- 
setRecursepublic void setRecurse(boolean recurse) Set whether recursive token expansion is enabled.- Parameters:
- recurse-- booleanwhether to recurse.
 
- 
isRecursepublic boolean isRecurse()Get whether recursive token expansion is enabled.- Returns:
- booleanwhether enabled.
 
- 
readFiltersFromFileRead the filters from the given file.- Parameters:
- filtersFile- the file from which filters are read.
- Throws:
- BuildException- when the file cannot be read.
 
- 
replaceTokensDoes replacement on the given string with token matching. This uses the defined begintoken and endtoken values which default to @ for both. This resets the passedTokens and calls iReplaceTokens to do the actual replacements.- Parameters:
- line- The line in which to process embedded tokens.
- Returns:
- The input string after token replacement.
 
- 
addFilterAdd a new filter.- Parameters:
- filter- the filter to be added.
 
- 
createFiltersfileCreate a new FiltersFile.- Returns:
- The filtersfile that was created.
 
- 
addFilter
- 
addConfiguredFilterSetAdd a Filterset to this filter set.- Parameters:
- filterSet- the filterset to be added to this filterset
 
- 
addConfiguredPropertySetAdds the properties provided by the specified PropertySet to this filterset.- Parameters:
- propertySet- the propertyset to be added to this propertyset
 
- 
hasFilterspublic boolean hasFilters()Test to see if this filter set has filters.- Returns:
- Return true if there are filters in this set.
 
- 
cloneClone the filterset.- Overrides:
- clonein class- DataType
- Returns:
- a deep clone of this filterset.
- Throws:
- BuildException- if the clone cannot be performed.
 
- 
setOnMissingFiltersFileSet the behavior WRT missing filtersfiles.- Parameters:
- onMissingFiltersFile- the OnMissing describing the behavior.
 
- 
getOnMissingFiltersFileGet the onMissingFiltersFile setting.- Returns:
- the OnMissing instance.
 
 
-