Package org.simpleframework.xml.filter
Class StackFilter
- java.lang.Object
-
- org.simpleframework.xml.filter.StackFilter
-
- All Implemented Interfaces:
Filter
- Direct Known Subclasses:
PlatformFilter
public class StackFilter extends java.lang.Object implements Filter
TheStackFilter
object provides a filter that can be given a collection of filters which can be used to resolve a replacement. The order of the resolution used for this filter is last in first used. This order allows the highest priority filter to be added last within the stack.- Author:
- Niall Gallagher
-
-
Constructor Summary
Constructors Constructor Description StackFilter()
Constructor for theStackFilter
object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
push(Filter filter)
This pushes the the providedFilter
on to the top of the stack.java.lang.String
replace(java.lang.String text)
Replaces the text provided with the value resolved from the stacked filters.
-
-
-
Method Detail
-
push
public void push(Filter filter)
This pushes the the providedFilter
on to the top of the stack. The last filter pushed on to the stack has the highes priority in the resolution of a replacement value.- Parameters:
filter
- this is a filter to be pushed on to the stack
-
replace
public java.lang.String replace(java.lang.String text)
Replaces the text provided with the value resolved from the stacked filters. This attempts to resolve a replacement from the top down. So the lastFilter
pushed on to the stack will be the first filter queried for a replacement.
-
-