Package org.thymeleaf.processor.element
Class MatchingAttributeName
- java.lang.Object
-
- org.thymeleaf.processor.element.MatchingAttributeName
-
public final class MatchingAttributeName extends java.lang.ObjectThis class models the way in which an
IElementProcessorcan match an element by one of its attributes.It allows the definition of a matching for a specific attribute with a specific prefix (usually that of the dialect including the processor), for every attribute with a specific prefix, and also for simply every attribute.
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 booleanmatchingAllAttributesprivate java.lang.StringmatchingAllAttributesWithPrefixprivate AttributeNamematchingAttributeNameprivate TemplateModetemplateMode
-
Constructor Summary
Constructors Modifier Constructor Description privateMatchingAttributeName(TemplateMode templateMode, AttributeName matchingAttributeName, java.lang.String matchingAllAttributesWithPrefix, boolean matchingAllAttributes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MatchingAttributeNameforAllAttributes(TemplateMode templateMode)static MatchingAttributeNameforAllAttributesWithPrefix(TemplateMode templateMode, java.lang.String matchingAllAttributesWithPrefix)static MatchingAttributeNameforAttributeName(TemplateMode templateMode, AttributeName matchingAttributeName)java.lang.StringgetMatchingAllAttributesWithPrefix()AttributeNamegetMatchingAttributeName()TemplateModegetTemplateMode()booleanisMatchingAllAttributes()booleanmatches(AttributeName attributeName)java.lang.StringtoString()
-
-
-
Field Detail
-
templateMode
private final TemplateMode templateMode
-
matchingAttributeName
private final AttributeName matchingAttributeName
-
matchingAllAttributesWithPrefix
private final java.lang.String matchingAllAttributesWithPrefix
-
matchingAllAttributes
private final boolean matchingAllAttributes
-
-
Constructor Detail
-
MatchingAttributeName
private MatchingAttributeName(TemplateMode templateMode, AttributeName matchingAttributeName, java.lang.String matchingAllAttributesWithPrefix, boolean matchingAllAttributes)
-
-
Method Detail
-
forAttributeName
public static MatchingAttributeName forAttributeName(TemplateMode templateMode, AttributeName matchingAttributeName)
-
forAllAttributesWithPrefix
public static MatchingAttributeName forAllAttributesWithPrefix(TemplateMode templateMode, java.lang.String matchingAllAttributesWithPrefix)
-
forAllAttributes
public static MatchingAttributeName forAllAttributes(TemplateMode templateMode)
-
getTemplateMode
public TemplateMode getTemplateMode()
-
getMatchingAttributeName
public AttributeName getMatchingAttributeName()
-
getMatchingAllAttributesWithPrefix
public java.lang.String getMatchingAllAttributesWithPrefix()
-
isMatchingAllAttributes
public boolean isMatchingAllAttributes()
-
matches
public boolean matches(AttributeName attributeName)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-