public abstract class IdempotentExtensionWalker extends ExtensionWalker
ExtensionWalker
which assures that each component is visited only once, making it easy to handle the fact that some
components such as OperationModel
, SourceModel
, ConnectionProviderModel
, etc, implement the flyweight
pattern, which means that the same instance might be present at different levels.
The use of this walker makes it unnecessary to manually control if a given component has already been seen.
Constructor and Description |
---|
IdempotentExtensionWalker() |
Modifier and Type | Method and Description |
---|---|
protected void |
onConnectionProvider(ConnectionProviderModel model)
Invoked when an
ConnectionProviderModel is found in the traversed extensionModel . |
protected void |
onConnectionProvider(HasConnectionProviderModels owner,
ConnectionProviderModel model)
Invoked when an
ConnectionProviderModel is found in the
traversed extensionModel |
protected void |
onConstruct(ConstructModel model)
Invoked when an
ConstructModel is found in the traversed extensionModel . |
protected void |
onConstruct(HasConstructModels owner,
ConstructModel model)
Invoked when an
ConstructModel is found in the
traversed extensionModel |
protected void |
onFunction(FunctionModel model)
Invoked when an
FunctionModel is found in the traversed extensionModel . |
protected void |
onFunction(HasFunctionModels owner,
FunctionModel model)
Invoked when an
FunctionModel is found in the
traversed extensionModel . |
protected void |
onOperation(HasOperationModels owner,
OperationModel model)
Invoked when an
OperationModel is found in the
traversed extensionModel . |
protected void |
onOperation(OperationModel model)
Invoked when an
OperationModel is found in the traversed extensionModel . |
protected void |
onParameter(ParameterGroupModel groupModel,
ParameterModel model)
Invoked when an
ParameterModel is found in the traversed extensionModel . |
protected void |
onParameter(ParameterizedModel owner,
ParameterGroupModel groupModel,
ParameterModel model)
Invoked when an
ParameterModel is found in the
traversed extensionModel |
protected void |
onParameterGroup(ParameterGroupModel model)
Invoked when an
ParameterGroupModel is found in the traversed extensionModel . |
protected void |
onParameterGroup(ParameterizedModel owner,
ParameterGroupModel model)
Invoked when an
ParameterGroupModel is found in the
traversed extensionModel |
protected void |
onSource(HasSourceModels owner,
SourceModel model)
Invoked when an
SourceModel is found in the
traversed extensionModel |
protected void |
onSource(SourceModel model)
Invoked when an
SourceModel is found in the traversed extensionModel . |
onConfiguration, stop, walk
protected final void onSource(HasSourceModels owner, SourceModel model)
ExtensionWalker
SourceModel
is found in the
traversed extensionModel
onSource
in class ExtensionWalker
owner
- The component that owns the sourcemodel
- the SourceModel
protected void onParameterGroup(ParameterizedModel owner, ParameterGroupModel model)
ExtensionWalker
ParameterGroupModel
is found in the
traversed extensionModel
onParameterGroup
in class ExtensionWalker
owner
- The component that owns the sourcemodel
- the ParameterGroupModel
protected void onParameter(ParameterizedModel owner, ParameterGroupModel groupModel, ParameterModel model)
ExtensionWalker
ParameterModel
is found in the
traversed extensionModel
onParameter
in class ExtensionWalker
owner
- The component that owns the parametergroupModel
- the ParameterGroupModel
in which the model
is containedmodel
- the ParameterModel
protected final void onOperation(HasOperationModels owner, OperationModel model)
ExtensionWalker
OperationModel
is found in the
traversed extensionModel
.
onOperation
in class ExtensionWalker
owner
- The component that owns the operationmodel
- the OperationModel
protected final void onFunction(HasFunctionModels owner, FunctionModel model)
ExtensionWalker
FunctionModel
is found in the
traversed extensionModel
.
onFunction
in class ExtensionWalker
owner
- The component that owns the functionmodel
- the FunctionModel
protected final void onConstruct(HasConstructModels owner, ConstructModel model)
ExtensionWalker
ConstructModel
is found in the
traversed extensionModel
onConstruct
in class ExtensionWalker
owner
- The component that owns the sourcemodel
- the ConstructModel
protected final void onConnectionProvider(HasConnectionProviderModels owner, ConnectionProviderModel model)
ExtensionWalker
ConnectionProviderModel
is found in the
traversed extensionModel
onConnectionProvider
in class ExtensionWalker
owner
- The component that owns the providermodel
- the ConnectionProviderModel
protected void onConnectionProvider(ConnectionProviderModel model)
ConnectionProviderModel
is found in the traversed extensionModel
.
This method will only be invoked once per each found instance
model
- the ConnectionProviderModel
protected void onSource(SourceModel model)
SourceModel
is found in the traversed extensionModel
.
This method will only be invoked once per each found instance
model
- the SourceModel
protected void onConstruct(ConstructModel model)
ConstructModel
is found in the traversed extensionModel
.
This method will only be invoked once per each found instance
model
- the ConstructModel
protected void onParameter(ParameterGroupModel groupModel, ParameterModel model)
ParameterModel
is found in the traversed extensionModel
.
This method will only be invoked once per each found instance
groupModel
- the ParameterGroupModel
on which the model
is containedmodel
- the ParameterModel
protected void onParameterGroup(ParameterGroupModel model)
ParameterGroupModel
is found in the traversed extensionModel
.
This method will only be invoked once per each found instance
model
- the ParameterModel
protected void onOperation(OperationModel model)
OperationModel
is found in the traversed extensionModel
.
This method will only be invoked once per each found instance
model
- the OperationModel
protected void onFunction(FunctionModel model)
FunctionModel
is found in the traversed extensionModel
.
This method will only be invoked once per each found instance
model
- the FunctionModel
Copyright © 2018. All rights reserved.