Class IdempotentDeclarationEnricherWalkDelegate

java.lang.Object
org.mule.runtime.extension.api.loader.WalkingDeclarationEnricher.DeclarationEnricherWalkDelegate
org.mule.runtime.extension.api.loader.IdempotentDeclarationEnricherWalkDelegate

public class IdempotentDeclarationEnricherWalkDelegate extends WalkingDeclarationEnricher.DeclarationEnricherWalkDelegate
A WalkingDeclarationEnricher.DeclarationEnricherWalkDelegate which assures that each component is visited only once, making it easy to handle the fact that some components such as OperationDeclaration, SourceDeclaration, ConnectionProviderDeclaration, etc, implement the flyweight pattern, which means that the same instance might be present at different levels. This is the delegate equivalent of IdempotentDeclarationWalker and should be used whenever a traditional walker would use it.

The use of this delegate makes it unnecessary to manually control if a given component has already been seen.

Since:
1.5
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onConnectionProvider(org.mule.runtime.api.meta.model.declaration.fluent.ConnectedDeclaration owner, org.mule.runtime.api.meta.model.declaration.fluent.ConnectionProviderDeclaration declaration)
    Invoked when an ConnectedDeclaration is found in the traversed extensionDeclaration
    protected void
    onConnectionProvider(org.mule.runtime.api.meta.model.declaration.fluent.ConnectionProviderDeclaration declaration)
    Invoked when an ConnectedDeclaration is found in the traversed extensionDeclaration.
    protected void
    onConstruct(org.mule.runtime.api.meta.model.declaration.fluent.ConstructDeclaration declaration)
    Invoked when a ConstructDeclaration is found in the traversed extensionDeclaration.
    void
    onConstruct(org.mule.runtime.api.meta.model.declaration.fluent.WithConstructsDeclaration owner, org.mule.runtime.api.meta.model.declaration.fluent.ConstructDeclaration declaration)
    Invoked when a ConstructDeclaration is found in the traversed extensionDeclaration.
    protected void
    onFunction(org.mule.runtime.api.meta.model.declaration.fluent.FunctionDeclaration declaration)
    Invoked when an FunctionDeclaration is found in the traversed extensionModel.
    void
    onFunction(org.mule.runtime.api.meta.model.declaration.fluent.WithFunctionsDeclaration owner, org.mule.runtime.api.meta.model.declaration.fluent.FunctionDeclaration model)
    Invoked when an FunctionDeclaration is found in the traversed extensionDeclaration.
    protected void
    onOperation(org.mule.runtime.api.meta.model.declaration.fluent.OperationDeclaration declaration)
    Invoked when an OperationDeclaration is found in the traversed extensionDeclaration.
    void
    onOperation(org.mule.runtime.api.meta.model.declaration.fluent.WithOperationsDeclaration owner, org.mule.runtime.api.meta.model.declaration.fluent.OperationDeclaration declaration)
    Invoked when an OperationDeclaration is found in the traversed extensionDeclaration.
    protected void
    onParameter(org.mule.runtime.api.meta.model.declaration.fluent.ParameterGroupDeclaration parameterGroup, org.mule.runtime.api.meta.model.declaration.fluent.ParameterDeclaration declaration)
    Invoked when an ParameterDeclaration is found in the traversed extensionDeclaration.
    void
    onParameter(org.mule.runtime.api.meta.model.declaration.fluent.ParameterizedDeclaration owner, org.mule.runtime.api.meta.model.declaration.fluent.ParameterGroupDeclaration parameterGroup, org.mule.runtime.api.meta.model.declaration.fluent.ParameterDeclaration declaration)
    Invoked when an ParameterDeclaration is found in the traversed extensionDeclaration
    protected void
    onParameterGroup(org.mule.runtime.api.meta.model.declaration.fluent.ParameterGroupDeclaration declaration)
    Invoked when an ParameterGroupDeclaration is found in the traversed extensionDeclaration
    void
    onParameterGroup(org.mule.runtime.api.meta.model.declaration.fluent.ParameterizedDeclaration owner, org.mule.runtime.api.meta.model.declaration.fluent.ParameterGroupDeclaration declaration)
    Invoked when an ParameterGroupDeclaration is found in the traversed extensionDeclaration
    protected void
    onSource(org.mule.runtime.api.meta.model.declaration.fluent.SourceDeclaration declaration)
    Invoked when an SourceDeclaration is found in the traversed extensionDeclaration
    void
    onSource(org.mule.runtime.api.meta.model.declaration.fluent.WithSourcesDeclaration owner, org.mule.runtime.api.meta.model.declaration.fluent.SourceDeclaration declaration)
    Invoked when an SourceDeclaration is found in the traversed extensionDeclaration

    Methods inherited from class org.mule.runtime.extension.api.loader.WalkingDeclarationEnricher.DeclarationEnricherWalkDelegate

    onConfiguration, onWalkFinished

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IdempotentDeclarationEnricherWalkDelegate

      public IdempotentDeclarationEnricherWalkDelegate()
  • Method Details

    • onSource

      public void onSource(org.mule.runtime.api.meta.model.declaration.fluent.WithSourcesDeclaration owner, org.mule.runtime.api.meta.model.declaration.fluent.SourceDeclaration declaration)
      Invoked when an SourceDeclaration is found in the traversed extensionDeclaration
      Overrides:
      onSource in class WalkingDeclarationEnricher.DeclarationEnricherWalkDelegate
      Parameters:
      owner - The declaration that owns the source
      declaration - the SourceDeclaration
    • onParameterGroup

      public void onParameterGroup(org.mule.runtime.api.meta.model.declaration.fluent.ParameterizedDeclaration owner, org.mule.runtime.api.meta.model.declaration.fluent.ParameterGroupDeclaration declaration)
      Invoked when an ParameterGroupDeclaration is found in the traversed extensionDeclaration
      Overrides:
      onParameterGroup in class WalkingDeclarationEnricher.DeclarationEnricherWalkDelegate
      Parameters:
      owner - The declaration that owns the parameter
      declaration - the ParameterGroupDeclaration
    • onParameter

      public void onParameter(org.mule.runtime.api.meta.model.declaration.fluent.ParameterizedDeclaration owner, org.mule.runtime.api.meta.model.declaration.fluent.ParameterGroupDeclaration parameterGroup, org.mule.runtime.api.meta.model.declaration.fluent.ParameterDeclaration declaration)
      Invoked when an ParameterDeclaration is found in the traversed extensionDeclaration
      Overrides:
      onParameter in class WalkingDeclarationEnricher.DeclarationEnricherWalkDelegate
      Parameters:
      owner - The declaration that owns the parameter
      parameterGroup - the group to which the declaration belongs
      declaration - the ParameterDeclaration
    • onOperation

      public void onOperation(org.mule.runtime.api.meta.model.declaration.fluent.WithOperationsDeclaration owner, org.mule.runtime.api.meta.model.declaration.fluent.OperationDeclaration declaration)
      Invoked when an OperationDeclaration is found in the traversed extensionDeclaration.

      Overrides:
      onOperation in class WalkingDeclarationEnricher.DeclarationEnricherWalkDelegate
      Parameters:
      owner - The declaration that owns the operation
      declaration - the WithOperationsDeclaration
    • onFunction

      public void onFunction(org.mule.runtime.api.meta.model.declaration.fluent.WithFunctionsDeclaration owner, org.mule.runtime.api.meta.model.declaration.fluent.FunctionDeclaration model)
      Invoked when an FunctionDeclaration is found in the traversed extensionDeclaration.

      Overrides:
      onFunction in class WalkingDeclarationEnricher.DeclarationEnricherWalkDelegate
      Parameters:
      owner - The declaration that owns the function
      model - the FunctionDeclaration
    • onConstruct

      public void onConstruct(org.mule.runtime.api.meta.model.declaration.fluent.WithConstructsDeclaration owner, org.mule.runtime.api.meta.model.declaration.fluent.ConstructDeclaration declaration)
      Invoked when a ConstructDeclaration is found in the traversed extensionDeclaration.

      Overrides:
      onConstruct in class WalkingDeclarationEnricher.DeclarationEnricherWalkDelegate
      Parameters:
      owner - The declaration that owns the operation
      declaration - the WithOperationsDeclaration
    • onConnectionProvider

      public void onConnectionProvider(org.mule.runtime.api.meta.model.declaration.fluent.ConnectedDeclaration owner, org.mule.runtime.api.meta.model.declaration.fluent.ConnectionProviderDeclaration declaration)
      Invoked when an ConnectedDeclaration is found in the traversed extensionDeclaration
      Overrides:
      onConnectionProvider in class WalkingDeclarationEnricher.DeclarationEnricherWalkDelegate
      Parameters:
      owner - The declaration that owns the provider
      declaration - the ConnectionProviderDeclaration
    • onConnectionProvider

      protected void onConnectionProvider(org.mule.runtime.api.meta.model.declaration.fluent.ConnectionProviderDeclaration declaration)
      Invoked when an ConnectedDeclaration is found in the traversed extensionDeclaration.

      This method will only be invoked once per each found instance

      Parameters:
      declaration - the ConnectionProviderDeclaration
    • onSource

      protected void onSource(org.mule.runtime.api.meta.model.declaration.fluent.SourceDeclaration declaration)
      Invoked when an SourceDeclaration is found in the traversed extensionDeclaration

      This method will only be invoked once per each found instance

      Parameters:
      declaration - the SourceDeclaration
    • onParameterGroup

      protected void onParameterGroup(org.mule.runtime.api.meta.model.declaration.fluent.ParameterGroupDeclaration declaration)
      Invoked when an ParameterGroupDeclaration is found in the traversed extensionDeclaration

      This method will only be invoked once per each found instance

      Parameters:
      declaration - the SourceDeclaration
    • onParameter

      protected void onParameter(org.mule.runtime.api.meta.model.declaration.fluent.ParameterGroupDeclaration parameterGroup, org.mule.runtime.api.meta.model.declaration.fluent.ParameterDeclaration declaration)
      Invoked when an ParameterDeclaration is found in the traversed extensionDeclaration.

      This method will only be invoked once per each found instance

      Parameters:
      parameterGroup - the ParameterGroupDeclaration in which the declaration is contained
      declaration - the ParameterDeclaration
    • onOperation

      protected void onOperation(org.mule.runtime.api.meta.model.declaration.fluent.OperationDeclaration declaration)
      Invoked when an OperationDeclaration is found in the traversed extensionDeclaration.

      This method will only be invoked once per each found instance.

      Parameters:
      declaration - the WithOperationsDeclaration
    • onConstruct

      protected void onConstruct(org.mule.runtime.api.meta.model.declaration.fluent.ConstructDeclaration declaration)
      Invoked when a ConstructDeclaration is found in the traversed extensionDeclaration.

      This method will only be invoked once per each found instance.

      Parameters:
      declaration - the WithOperationsDeclaration
    • onFunction

      protected void onFunction(org.mule.runtime.api.meta.model.declaration.fluent.FunctionDeclaration declaration)
      Invoked when an FunctionDeclaration is found in the traversed extensionModel.

      This method will only be invoked once per each found instance

      Parameters:
      declaration - the FunctionDeclaration