jodd.lagarto.csselly.selector
Class PseudoFunctionSelector

java.lang.Object
  extended by jodd.lagarto.csselly.Selector
      extended by jodd.lagarto.csselly.selector.PseudoFunctionSelector
All Implemented Interfaces:
NodeFilter

public class PseudoFunctionSelector
extends Selector
implements NodeFilter

Pseudo function selector.


Nested Class Summary
 
Nested classes/interfaces inherited from class jodd.lagarto.csselly.Selector
Selector.Type
 
Field Summary
protected  java.lang.String expression
           
protected static java.util.Map<java.lang.String,PseudoFunction> PSEUDO_FUNCTION_MAP
           
protected  PseudoFunction pseudoFunction
           
 
Fields inherited from class jodd.lagarto.csselly.Selector
type
 
Constructor Summary
PseudoFunctionSelector(java.lang.String functionName, java.lang.String expression)
           
 
Method Summary
 boolean accept(java.util.LinkedList<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.
 PseudoFunction 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.
 
Methods inherited from class jodd.lagarto.csselly.Selector
getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PSEUDO_FUNCTION_MAP

protected static final java.util.Map<java.lang.String,PseudoFunction> PSEUDO_FUNCTION_MAP

pseudoFunction

protected final PseudoFunction pseudoFunction

expression

protected final java.lang.String expression
Constructor Detail

PseudoFunctionSelector

public PseudoFunctionSelector(java.lang.String functionName,
                              java.lang.String expression)
Method Detail

registerPseudoFunction

public static void registerPseudoFunction(java.lang.Class<? extends PseudoFunction> pseudoFunctionType)
Registers pseudo function.


lookupPseudoFunction

public static PseudoFunction lookupPseudoFunction(java.lang.String pseudoFunctionName)
Lookups pseudo function for given pseudo function name.


getPseudoFunction

public PseudoFunction getPseudoFunction()
Returns pseudo function.


getExpression

public java.lang.String getExpression()
Returns expression string.


accept

public boolean accept(Node node)
Matches nodes with this pseudo function selector.

Specified by:
accept in interface NodeFilter

accept

public boolean accept(java.util.LinkedList<Node> currentResults,
                      Node node,
                      int index)
Accepts node within selected results. Invoked after results are matched.



Copyright © 2003-2011 Jodd Team