Class AbstractProcessableElementTag
- java.lang.Object
-
- org.thymeleaf.engine.AbstractTemplateEvent
-
- org.thymeleaf.engine.AbstractElementTag
-
- org.thymeleaf.engine.AbstractProcessableElementTag
-
- All Implemented Interfaces:
IElementTag,IProcessableElementTag,ITemplateEvent
- Direct Known Subclasses:
OpenElementTag,StandaloneElementTag
abstract class AbstractProcessableElementTag extends AbstractElementTag implements IProcessableElementTag
- Since:
- 3.0.0
-
-
Field Summary
Fields Modifier and Type Field Description private IElementProcessor[]associatedProcessors(package private) Attributesattributesprivate static IElementProcessor[]EMPTY_ASSOCIATED_PROCESSORS-
Fields inherited from class org.thymeleaf.engine.AbstractElementTag
elementCompleteName, elementDefinition, synthetic, templateMode
-
Fields inherited from class org.thymeleaf.engine.AbstractTemplateEvent
col, line, templateName
-
-
Constructor Summary
Constructors Constructor Description AbstractProcessableElementTag(TemplateMode templateMode, ElementDefinition elementDefinition, java.lang.String elementCompleteName, Attributes attributes, boolean synthetic)AbstractProcessableElementTag(TemplateMode templateMode, ElementDefinition elementDefinition, java.lang.String elementCompleteName, Attributes attributes, boolean synthetic, java.lang.String templateName, int line, int col)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private IElementProcessor[]computeProcessors()IAttribute[]getAllAttributes()Returns an array with all the attributes contained in the tag.(package private) IElementProcessor[]getAssociatedProcessors()IAttributegetAttribute(java.lang.String completeName)Returns the object modelling a specific attribute in the tag (or null if it does not exist).IAttributegetAttribute(java.lang.String prefix, java.lang.String name)Returns the object modelling a specific attribute in the tag (or null if it does not exist).IAttributegetAttribute(AttributeName attributeName)Returns the object modelling a specific attribute in the tag (or null if it does not exist).java.util.Map<java.lang.String,java.lang.String>getAttributeMap()Returns a Map containing all the attribute names+values in the tag.java.lang.StringgetAttributeValue(java.lang.String completeName)Returns the value of a specific attribute in the tag (or null if it does not exist).java.lang.StringgetAttributeValue(java.lang.String prefix, java.lang.String name)Returns the value of a specific attribute in the tag (or null if it does not exist).java.lang.StringgetAttributeValue(AttributeName attributeName)Returns the value of a specific attribute in the tag (or null if it does not exist).(package private) booleanhasAssociatedProcessors()booleanhasAttribute(java.lang.String completeName)Returns whether an attribute is exists at the tag or not.booleanhasAttribute(java.lang.String prefix, java.lang.String name)Returns whether an attribute is exists at the tag or not.booleanhasAttribute(AttributeName attributeName)Returns whether an attribute is exists at the tag or not.(package private) abstract AbstractProcessableElementTagremoveAttribute(java.lang.String completeName)(package private) abstract AbstractProcessableElementTagremoveAttribute(java.lang.String prefix, java.lang.String name)(package private) abstract AbstractProcessableElementTagremoveAttribute(AttributeName attributeName)(package private) abstract AbstractProcessableElementTagreplaceAttribute(AttributeDefinitions attributeDefinitions, AttributeName oldName, AttributeDefinition newAttributeDefinition, java.lang.String completeNewName, java.lang.String value, AttributeValueQuotes valueQuotes)(package private) abstract AbstractProcessableElementTagsetAttribute(AttributeDefinitions attributeDefinitions, AttributeDefinition attributeDefinition, java.lang.String completeName, java.lang.String value, AttributeValueQuotes valueQuotes)-
Methods inherited from class org.thymeleaf.engine.AbstractElementTag
getElementCompleteName, getElementDefinition, getTemplateMode, isSynthetic, toString
-
Methods inherited from class org.thymeleaf.engine.AbstractTemplateEvent
getCol, getLine, getTemplateName, hasLocation
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.thymeleaf.model.IElementTag
getElementCompleteName, getElementDefinition, getTemplateMode, isSynthetic
-
Methods inherited from interface org.thymeleaf.model.ITemplateEvent
accept, getCol, getLine, getTemplateName, hasLocation, write
-
-
-
-
Field Detail
-
EMPTY_ASSOCIATED_PROCESSORS
private static final IElementProcessor[] EMPTY_ASSOCIATED_PROCESSORS
-
attributes
final Attributes attributes
-
associatedProcessors
private volatile IElementProcessor[] associatedProcessors
-
-
Constructor Detail
-
AbstractProcessableElementTag
AbstractProcessableElementTag(TemplateMode templateMode, ElementDefinition elementDefinition, java.lang.String elementCompleteName, Attributes attributes, boolean synthetic)
-
AbstractProcessableElementTag
AbstractProcessableElementTag(TemplateMode templateMode, ElementDefinition elementDefinition, java.lang.String elementCompleteName, Attributes attributes, boolean synthetic, java.lang.String templateName, int line, int col)
-
-
Method Detail
-
hasAttribute
public final boolean hasAttribute(java.lang.String completeName)
Description copied from interface:IProcessableElementTagReturns whether an attribute is exists at the tag or not.
- Specified by:
hasAttributein interfaceIProcessableElementTag- Parameters:
completeName- the complete name of the attribute that is being queried.- Returns:
- true if the attribute exists, false if not.
-
hasAttribute
public final boolean hasAttribute(java.lang.String prefix, java.lang.String name)Description copied from interface:IProcessableElementTagReturns whether an attribute is exists at the tag or not.
- Specified by:
hasAttributein interfaceIProcessableElementTag- Parameters:
prefix- the prefix of the attribute that is being queried (might be null).name- the name of tha attribute that is being queried.- Returns:
- true if the attribute exists, false if not.
-
hasAttribute
public final boolean hasAttribute(AttributeName attributeName)
Description copied from interface:IProcessableElementTagReturns whether an attribute is exists at the tag or not.
- Specified by:
hasAttributein interfaceIProcessableElementTag- Parameters:
attributeName- the name of the attribute that is being queried.- Returns:
- true if the attribute exists, false if not.
-
getAttribute
public final IAttribute getAttribute(java.lang.String completeName)
Description copied from interface:IProcessableElementTagReturns the object modelling a specific attribute in the tag (or null if it does not exist).
- Specified by:
getAttributein interfaceIProcessableElementTag- Parameters:
completeName- the complete name of the attribute that is being queried.- Returns:
- the
IAttributefor the queried attribute, or null if it does not exist.
-
getAttribute
public final IAttribute getAttribute(java.lang.String prefix, java.lang.String name)
Description copied from interface:IProcessableElementTagReturns the object modelling a specific attribute in the tag (or null if it does not exist).
- Specified by:
getAttributein interfaceIProcessableElementTag- Parameters:
prefix- the prefix of the attribute that is being queried (might be null).name- the name of tha attribute that is being queried.- Returns:
- the
IAttributefor the queried attribute, or null if it does not exist.
-
getAttribute
public final IAttribute getAttribute(AttributeName attributeName)
Description copied from interface:IProcessableElementTagReturns the object modelling a specific attribute in the tag (or null if it does not exist).
- Specified by:
getAttributein interfaceIProcessableElementTag- Parameters:
attributeName- the name of the attribute that is being queried.- Returns:
- the
IAttributefor the queried attribute, or null if it does not exist.
-
getAttributeValue
public final java.lang.String getAttributeValue(java.lang.String completeName)
Description copied from interface:IProcessableElementTagReturns the value of a specific attribute in the tag (or null if it does not exist).
- Specified by:
getAttributeValuein interfaceIProcessableElementTag- Parameters:
completeName- the complete name of the attribute that is being queried.- Returns:
- the value of the queried attribute, or null if it does not exist.
-
getAttributeValue
public final java.lang.String getAttributeValue(java.lang.String prefix, java.lang.String name)Description copied from interface:IProcessableElementTagReturns the value of a specific attribute in the tag (or null if it does not exist).
- Specified by:
getAttributeValuein interfaceIProcessableElementTag- Parameters:
prefix- the prefix of the attribute that is being queried (might be null).name- the name of tha attribute that is being queried.- Returns:
- the value of the queried attribute, or null if it does not exist.
-
getAttributeValue
public final java.lang.String getAttributeValue(AttributeName attributeName)
Description copied from interface:IProcessableElementTagReturns the value of a specific attribute in the tag (or null if it does not exist).
- Specified by:
getAttributeValuein interfaceIProcessableElementTag- Parameters:
attributeName- the name of the attribute that is being queried.- Returns:
- the value of the queried attribute, or null if it does not exist.
-
getAllAttributes
public IAttribute[] getAllAttributes()
Description copied from interface:IProcessableElementTagReturns an array with all the attributes contained in the tag.
This array is a defensive copy of the original data kept at the tag, and might be null if there are no attributes at the tag.
- Specified by:
getAllAttributesin interfaceIProcessableElementTag- Returns:
- the array of attributes.
-
getAttributeMap
public java.util.Map<java.lang.String,java.lang.String> getAttributeMap()
Description copied from interface:IProcessableElementTagReturns a Map containing all the attribute names+values in the tag.
This array is a defensive copy of the original data kept at the tag, and might be null if there are no attributes at the tag.
- Specified by:
getAttributeMapin interfaceIProcessableElementTag- Returns:
- the map of attributes.
-
getAssociatedProcessors
IElementProcessor[] getAssociatedProcessors()
-
hasAssociatedProcessors
boolean hasAssociatedProcessors()
-
computeProcessors
private IElementProcessor[] computeProcessors()
-
setAttribute
abstract AbstractProcessableElementTag setAttribute(AttributeDefinitions attributeDefinitions, AttributeDefinition attributeDefinition, java.lang.String completeName, java.lang.String value, AttributeValueQuotes valueQuotes)
-
replaceAttribute
abstract AbstractProcessableElementTag replaceAttribute(AttributeDefinitions attributeDefinitions, AttributeName oldName, AttributeDefinition newAttributeDefinition, java.lang.String completeNewName, java.lang.String value, AttributeValueQuotes valueQuotes)
-
removeAttribute
abstract AbstractProcessableElementTag removeAttribute(java.lang.String prefix, java.lang.String name)
-
removeAttribute
abstract AbstractProcessableElementTag removeAttribute(java.lang.String completeName)
-
removeAttribute
abstract AbstractProcessableElementTag removeAttribute(AttributeName attributeName)
-
-