public class XmlDslSyntaxResolver extends Object implements DslSyntaxResolver
DslSyntaxResolver
based on XML.
Provides the DslElementSyntax
of any Component
, Parameter
or
Type
within the context of the Extension model
where the Component was declared.
Constructor and Description |
---|
XmlDslSyntaxResolver(ExtensionModel model,
DslResolvingContext context)
Creates an instance using the default implementation
|
XmlDslSyntaxResolver(ExtensionModel model,
ImportTypesStrategy importTypesStrategy)
Creates an instance using the default implementation
|
Modifier and Type | Method and Description |
---|---|
Optional<DslElementSyntax> |
resolve(MetadataType type)
Resolves the
DslElementSyntax for the standalone xml element for the given MetadataType |
DslElementSyntax |
resolve(NamedObject component)
Resolves the
DslElementSyntax for the given component . |
DslElementSyntax |
resolve(ParameterModel parameter)
Resolves the
DslElementSyntax for the given parameter , providing all the required information
for representing this parameter element in the DSL. |
DslElementSyntax |
resolveInline(ParameterGroupModel group)
Resolves the
DslElementSyntax for a ParameterGroupModel that has
to be shown as an inline element of the DSL |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDefault, getDefault
public XmlDslSyntaxResolver(ExtensionModel model, DslResolvingContext context)
model
- the ExtensionModel
that provides context for resolving the component's DslElementSyntax
context
- the DslResolvingContext
in which the Dsl resolution takes placeIllegalArgumentException
- if the ExtensionModel
declares an imported type from an ExtensionModel
not
present in the provided DslResolvingContext
or if the imported ExtensionModel
doesn't have any
ImportedTypeModel
public XmlDslSyntaxResolver(ExtensionModel model, ImportTypesStrategy importTypesStrategy)
model
- the ExtensionModel
that provides context for resolving the component's DslElementSyntax
importTypesStrategy
- the ImportTypesStrategy
used for external types resolutionIllegalArgumentException
- if the ExtensionModel
declares an imported type from an ExtensionModel
not
present in the provided DslResolvingContext
or if the imported ExtensionModel
doesn't have any
ImportedTypeModel
public DslElementSyntax resolve(NamedObject component)
DslElementSyntax
for the given component
.resolve
in interface DslSyntaxResolver
component
- the NamedObject
element to be described in the DslElementSyntax
DslElementSyntax
for the model
public DslElementSyntax resolve(ParameterModel parameter)
DslElementSyntax
for the given parameter
, providing all the required information
for representing this parameter
element in the DSL.resolve
in interface DslSyntaxResolver
parameter
- the ParameterModel
to be described in the DslElementSyntax
DslElementSyntax
for the parameter
public DslElementSyntax resolveInline(ParameterGroupModel group)
DslElementSyntax
for a ParameterGroupModel
that has
to be shown as an inline element of the DSLresolveInline
in interface DslSyntaxResolver
group
- the ParameterGroupModel
to be described in the DslElementSyntax
DslElementSyntax
for the group
public Optional<DslElementSyntax> resolve(MetadataType type)
DslElementSyntax
for the standalone xml element for the given MetadataType
resolve
in interface DslSyntaxResolver
type
- the MetadataType
to be described in the DslElementSyntax
DslElementSyntax
for the top level element associated to the MetadataType
or
Optional.empty()
if the type
is not supported as an standalone elementCopyright © 2018. All rights reserved.