public class PseudoFunctionSelector<E> extends Selector implements NodeFilter, NodeListFilter
Selector.Type
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
expression |
protected E |
parsedExpression |
protected static java.util.Map<java.lang.String,PseudoFunction> |
PSEUDO_FUNCTION_MAP |
protected PseudoFunction<E> |
pseudoFunction |
Constructor and Description |
---|
PseudoFunctionSelector(java.lang.String functionName,
java.lang.String expression)
Creates pseudo function selector for given function and expression.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.util.List<Node> currentResults,
Node node,
int index)
Accepts node within selected results.
|
boolean |
accept(Node node)
Matches nodes with this pseudo function selector.
|
java.lang.String |
getExpression()
Returns expression string.
|
E |
getParsedExpression()
Returns parsed expression object.
|
PseudoFunction<E> |
getPseudoFunction()
Returns
pseudo function . |
static PseudoFunction<?> |
lookupPseudoFunction(java.lang.String pseudoFunctionName)
Lookups pseudo function for given pseudo function name.
|
static void |
registerPseudoFunction(java.lang.Class<? extends PseudoFunction> pseudoFunctionType)
Registers pseudo function.
|
protected static final java.util.Map<java.lang.String,PseudoFunction> PSEUDO_FUNCTION_MAP
protected final PseudoFunction<E> pseudoFunction
protected final java.lang.String expression
protected final E parsedExpression
public PseudoFunctionSelector(java.lang.String functionName, java.lang.String expression)
public static void registerPseudoFunction(java.lang.Class<? extends PseudoFunction> pseudoFunctionType)
public static PseudoFunction<?> lookupPseudoFunction(java.lang.String pseudoFunctionName)
public PseudoFunction<E> getPseudoFunction()
pseudo function
.public java.lang.String getExpression()
public E getParsedExpression()
public boolean accept(Node node)
accept
in interface NodeFilter
public boolean accept(java.util.List<Node> currentResults, Node node, int index)
accept
in interface NodeListFilter
Copyright © 2003-present Jodd Team