Module org.mule.runtime.dsl.api
Class DefaultXmlMetadataAnnotations
java.lang.Object
org.mule.runtime.dsl.internal.xml.parser.DefaultXmlMetadataAnnotations
- All Implemented Interfaces:
XmlMetadataAnnotations
Stores the metadata annotations from the XML parser so they are available when building the actual objects of the application.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.mule.runtime.dsl.internal.xml.parser.XmlMetadataAnnotations
XmlMetadataAnnotations.TagBoundaries -
Field Summary
Fields inherited from interface org.mule.runtime.dsl.internal.xml.parser.XmlMetadataAnnotations
METADATA_ANNOTATIONS_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendElementBody(String elementBody) Adds the body of the xml tag.voidappendElementEnd(String qName) Builds the closing tag of the xml element.voidappendElementStart(String qName, Map<String, String> atts) Builds the opening tag of the xml element.boolean
-
Constructor Details
-
DefaultXmlMetadataAnnotations
public DefaultXmlMetadataAnnotations()
-
-
Method Details
-
appendElementStart
Builds the opening tag of the xml element.- Specified by:
appendElementStartin interfaceXmlMetadataAnnotations- Parameters:
qName- the qualified name of the elementatts- the attributes of the element, with the qualified name as key
-
appendElementBody
Adds the body of the xml tag.- Specified by:
appendElementBodyin interfaceXmlMetadataAnnotations- Parameters:
elementBody- the body content to be added
-
appendElementEnd
Builds the closing tag of the xml element.- Specified by:
appendElementEndin interfaceXmlMetadataAnnotations- Parameters:
qName- the qualified name of the element
-
getElementString
- Specified by:
getElementStringin interfaceXmlMetadataAnnotations- Returns:
- the reconstruction of the declaration of the element in its source xml file. Note that the order of the elements may be different, and any implicit attributes with default values will be included.
-
isSelfClosing
public boolean isSelfClosing()- Specified by:
isSelfClosingin interfaceXmlMetadataAnnotations- Returns:
- Whether the element was written as in
<element />in the source code. In such case, the opening and closing tag boundaries will be the same, as both tags are merged into one.
-
getOpeningTagBoundaries
- Specified by:
getOpeningTagBoundariesin interfaceXmlMetadataAnnotations- Returns:
- the boundaries of the opening tag on the source xml file.
-
getClosingTagBoundaries
- Specified by:
getClosingTagBoundariesin interfaceXmlMetadataAnnotations- Returns:
- the boundaries of the closing tag on the source xml file.
-