public final 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(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() |
DslElementSyntax |
getDsl() |
Optional<ComponentIdentifier> |
getIdentifier() |
T |
getModel() |
Optional<String> |
getValue() |
int |
hashCode() |
boolean |
isExplicitInDsl() |
public DslElementSyntax getDsl()
DslElementSyntax
associated to this
element
public 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 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(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
identifier
modelName
- the modelName
used for matchingDslElementModel
associated to the given identifier
, if one was found.public static <M> DslElementModel.Builder<M> builder()
DslElementModel.Builder
Copyright © 2018. All rights reserved.