public abstract class DeclarationWalker extends Object
ExtensionDeclaration and invokes methods when important
model components are found.
This is useful to centralize the logic of how to iterate through a
model's structure without coupling to it. For example, the
onOperation(WithOperationsDeclaration, OperationDeclaration)
method allows handling operations without requiring to know that they can exist
at global or configuration level. Something similar can be said
about the onParameter(ParameterizedInterceptableDeclaration, ParameterDeclaration),
etc.
| Constructor and Description |
|---|
DeclarationWalker() |
| Modifier and Type | Method and Description |
|---|---|
void |
onConfiguration(ConfigurationDeclaration declaration)
Invoked when a
ConfigurationDeclaration is found in the
traversed extensionDeclaration |
void |
onConnectionProvider(ConnectedDeclaration owner,
ConnectionProviderDeclaration declaration)
Invoked when an
ConnectedDeclaration is found in the
traversed extensionDeclaration |
void |
onOperation(WithOperationsDeclaration owner,
OperationDeclaration declaration)
Invoked when an
OperationDeclaration is found in the
traversed extensionDeclaration |
void |
onParameter(ParameterizedInterceptableDeclaration owner,
ParameterDeclaration declaration)
Invoked when an
ParameterDeclaration is found in the
traversed extensionDeclaration |
void |
onSource(WithSourcesDeclaration owner,
SourceDeclaration declaration)
Invoked when an
SourceDeclaration is found in the
traversed extensionDeclaration |
void |
walk(ExtensionDeclaration extensionDeclaration)
Navigates the given
extensionDeclaration and invokes the
other public method's in this class as the navigation
progresses |
public final void walk(ExtensionDeclaration extensionDeclaration)
extensionDeclaration and invokes the
other public method's in this class as the navigation
progressesextensionDeclaration - the model to navigatepublic void onConfiguration(ConfigurationDeclaration declaration)
ConfigurationDeclaration is found in the
traversed extensionDeclarationdeclaration - a ConfigurationDeclarationpublic void onOperation(WithOperationsDeclaration owner, OperationDeclaration declaration)
OperationDeclaration is found in the
traversed extensionDeclarationowner - The declaration that owns the operationdeclaration - the WithOperationsDeclarationpublic void onConnectionProvider(ConnectedDeclaration owner, ConnectionProviderDeclaration declaration)
ConnectedDeclaration is found in the
traversed extensionDeclarationowner - The declaration that owns the providerdeclaration - the ConnectionProviderDeclarationpublic void onSource(WithSourcesDeclaration owner, SourceDeclaration declaration)
SourceDeclaration is found in the
traversed extensionDeclarationowner - The declaration that owns the sourcedeclaration - the SourceDeclarationpublic void onParameter(ParameterizedInterceptableDeclaration owner, ParameterDeclaration declaration)
ParameterDeclaration is found in the
traversed extensionDeclarationowner - The declaration that owns the parameterdeclaration - the ParameterDeclarationCopyright © 2016 MuleSoft, Inc.. All rights reserved.