org.thymeleaf.processor
Class ElementNameProcessorMatcher

Object
  extended by org.thymeleaf.processor.ElementNameProcessorMatcher
All Implemented Interfaces:
IElementNameProcessorMatcher, IProcessorMatcher<Element>

public final class ElementNameProcessorMatcher
extends Object
implements IElementNameProcessorMatcher

Since:
2.0.0
Author:
Daniel Fernández

Constructor Summary
ElementNameProcessorMatcher(String elementName)
           
ElementNameProcessorMatcher(String elementName, java.util.Map<String,String> attributeValuesByNameFilter)
           
ElementNameProcessorMatcher(String elementName, String filterAttributeName, String filterAttributeValue)
           
 
Method Summary
 Class<? extends Element> appliesTo()
           Returns the type of Node this matcher applies to (and therefore the type of Node that processors with this matcher will apply to).
 java.util.Map<String,String> getAttributeValuesByNameFilter()
           
 String getElementName(ProcessorMatchingContext context)
           
 boolean hasFilter()
           
 boolean matches(Node node, ProcessorMatchingContext context)
           Try to match the node, using the specified matching context.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementNameProcessorMatcher

public ElementNameProcessorMatcher(String elementName)

ElementNameProcessorMatcher

public ElementNameProcessorMatcher(String elementName,
                                   String filterAttributeName,
                                   String filterAttributeValue)

ElementNameProcessorMatcher

public ElementNameProcessorMatcher(String elementName,
                                   java.util.Map<String,String> attributeValuesByNameFilter)
Method Detail

getElementName

public String getElementName(ProcessorMatchingContext context)
Specified by:
getElementName in interface IElementNameProcessorMatcher

getAttributeValuesByNameFilter

public java.util.Map<String,String> getAttributeValuesByNameFilter()

hasFilter

public boolean hasFilter()

matches

public boolean matches(Node node,
                       ProcessorMatchingContext context)
Description copied from interface: IProcessorMatcher

Try to match the node, using the specified matching context.

Specified by:
matches in interface IProcessorMatcher<Element>
Parameters:
node - the node to be matched
context - the matching context
Returns:
true if the node matches, false if not.

appliesTo

public final Class<? extends Element> appliesTo()
Description copied from interface: IProcessorMatcher

Returns the type of Node this matcher applies to (and therefore the type of Node that processors with this matcher will apply to).

Specified by:
appliesTo in interface IProcessorMatcher<Element>
Returns:
the type of node (subclass of Node) this matcher applies to.


Copyright © 2012 The THYMELEAF team. All Rights Reserved.