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.dsl.api.component.config.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(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<ComponentConfiguration> |
getConfiguration() |
List<DslElementModel> |
getContainedElements() |
org.mule.runtime.extension.api.dsl.syntax.DslElementSyntax |
getDsl() |
Optional<ComponentIdentifier> |
getIdentifier() |
T |
getModel() |
Optional<String> |
getValue() |
int |
hashCode() |
public org.mule.runtime.extension.api.dsl.syntax.DslElementSyntax getDsl()
DslElementSyntax associated to this elementpublic List<DslElementModel> getContainedElements()
public Optional<ComponentIdentifier> getIdentifier()
identifier associated to
this element, if one was provided.public Optional<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 <E> Optional<DslElementModel<E>> findElement(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 may 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–2017 MuleSoft, Inc.. All rights reserved.