Package org.thymeleaf.processor.element
Class MatchingElementName
- java.lang.Object
-
- org.thymeleaf.processor.element.MatchingElementName
-
public final class MatchingElementName extends java.lang.ObjectThis class models the way in which an
IElementProcessorcan match an element by its name.It allows the definition of a matching for a specific element with a specific prefix (usually that of the dialect including the processor), for every element with a specific prefix, and also for simply every element.
Objects of this class are normally built by the constructors of the processors or their extended abstract processor classes.
- Since:
- 3.0.0
-
-
Field Summary
Fields Modifier and Type Field Description private booleanmatchingAllElementsprivate java.lang.StringmatchingAllElementsWithPrefixprivate ElementNamematchingElementNameprivate TemplateModetemplateMode
-
Constructor Summary
Constructors Modifier Constructor Description privateMatchingElementName(TemplateMode templateMode, ElementName matchingElementName, java.lang.String matchingAllElementsWithPrefix, boolean matchingAllElements)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MatchingElementNameforAllElements(TemplateMode templateMode)static MatchingElementNameforAllElementsWithPrefix(TemplateMode templateMode, java.lang.String matchingAllElementsWithPrefix)static MatchingElementNameforElementName(TemplateMode templateMode, ElementName matchingElementName)java.lang.StringgetMatchingAllElementsWithPrefix()ElementNamegetMatchingElementName()TemplateModegetTemplateMode()booleanisMatchingAllElements()booleanmatches(ElementName elementName)java.lang.StringtoString()
-
-
-
Field Detail
-
templateMode
private final TemplateMode templateMode
-
matchingElementName
private final ElementName matchingElementName
-
matchingAllElementsWithPrefix
private final java.lang.String matchingAllElementsWithPrefix
-
matchingAllElements
private final boolean matchingAllElements
-
-
Constructor Detail
-
MatchingElementName
private MatchingElementName(TemplateMode templateMode, ElementName matchingElementName, java.lang.String matchingAllElementsWithPrefix, boolean matchingAllElements)
-
-
Method Detail
-
forElementName
public static MatchingElementName forElementName(TemplateMode templateMode, ElementName matchingElementName)
-
forAllElementsWithPrefix
public static MatchingElementName forAllElementsWithPrefix(TemplateMode templateMode, java.lang.String matchingAllElementsWithPrefix)
-
forAllElements
public static MatchingElementName forAllElements(TemplateMode templateMode)
-
getTemplateMode
public TemplateMode getTemplateMode()
-
getMatchingElementName
public ElementName getMatchingElementName()
-
getMatchingAllElementsWithPrefix
public java.lang.String getMatchingAllElementsWithPrefix()
-
isMatchingAllElements
public boolean isMatchingAllElements()
-
matches
public boolean matches(ElementName elementName)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-