public class DslElementModel<T> extends Object
model of type T is related to its DSL
representation.
This DslElementModel can be related to an ComponentConfiguration of a configuration file by using the
findElement(org.mule.runtime.api.component.ComponentIdentifier) lookup with the required ComponentIdentifier, and thus providing a way to relate an
ComponentConfiguration to the ExtensionModel component or MetadataType it represents.
| Modifier and Type | Class and Description |
|---|---|
static class |
DslElementModel.Builder<M> |
| Modifier and Type | Method and Description |
|---|---|
static <M> DslElementModel.Builder<M> |
builder() |
boolean |
equals(Object o) |
<E> Optional<DslElementModel<E>> |
findElement(org.mule.runtime.api.component.ComponentIdentifier identifier)
Lookup method for finding a given
DslElementModel based on its identifier from
this element as root. |
<E> Optional<DslElementModel<E>> |
findElement(String modelName)
Lookup method for finding a given
DslElementModel based on its parameterName from this element as
root. |
Optional<org.mule.runtime.dsl.api.component.config.ComponentConfiguration> |
getConfiguration() |
List<DslElementModel> |
getContainedElements() |
org.mule.runtime.extension.api.dsl.syntax.DslElementSyntax |
getDsl() |
Optional<org.mule.runtime.api.component.ComponentIdentifier> |
getIdentifier() |
T |
getModel() |
Optional<String> |
getValue() |
int |
hashCode() |
boolean |
isExplicitInDsl() |
public org.mule.runtime.extension.api.dsl.syntax.DslElementSyntax getDsl()
DslElementSyntax associated to this elementpublic List<DslElementModel> getContainedElements()
public Optional<org.mule.runtime.api.component.ComponentIdentifier> getIdentifier()
identifier associated to this element, if one was
provided.public Optional<org.mule.runtime.dsl.api.component.config.ComponentConfiguration> getConfiguration()
ComponentConfiguration associated to this element, if one was provided.public Optional<String> getValue()
value assigned to this element in its current configuration. This represents either the value of an
attribute or that of a text child element.public boolean isExplicitInDsl()
true if the element represented by this DslElementModel has to be explicitly declared in the
DSL, or if it's only present in the internal application representation.public <E> Optional<DslElementModel<E>> findElement(org.mule.runtime.api.component.ComponentIdentifier identifier)
DslElementModel based on its identifier from
this element as root. If this DslElementModel doesn't match with the given identifier, then a DFS
lookup is performed for each of its inner elements.identifier - the ComponentIdentifier used for matchingDslElementModel associated to the given identifier, if one was found.public <E> Optional<DslElementModel<E>> findElement(String modelName)
DslElementModel based on its parameterName from this element as
root. If this DslElementModel name doesn't match with the given parameterName, then a DFS lookup is performed
for each of its inner elements. Since not all the elements in an application may have an
DslElementSyntax::getElementName this lookup method may produce different results than the lookup by
identifiermodelName - the modelName used for matchingDslElementModel associated to the given identifier, if one was found.public static <M> DslElementModel.Builder<M> builder()
DslElementModel.BuilderCopyright © 2003–2019 MuleSoft, Inc.. All rights reserved.