Package org.mule.runtime.ast.api.util
Class BaseComponentAstDecorator
java.lang.Object
org.mule.runtime.ast.api.util.BaseComponentAstDecorator
- All Implemented Interfaces:
ComponentAst
This class provides a skeletal implementation of the
ComponentAst interface, to minimize the effort required to
implement this interface when decorating instances of ComponentAst.- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionBaseComponentAstDecorator(ComponentAst decorated) Creates a new decorator for the provided instance. -
Method Summary
Modifier and TypeMethodDescriptionThis method will NOT traverse any complex parameters this component has.This method will NOT traverse any complex parameters this component has.An annotation is defined by the DSL processor that creates the instances ofComponentAst.org.mule.runtime.api.component.TypedComponentIdentifier.ComponentTypeprotected ComponentAstorg.mule.runtime.api.meta.model.ExtensionModelorg.mule.runtime.api.component.ComponentIdentifierorg.mule.runtime.api.component.location.ComponentLocation<M> Optional<M>A component may be represented by different kinds of models, depending on the actual type of this component.getParameter(String groupName, String paramName) A parameter may have a value either because it is explicitly set in the DSL, or because the extension model defines a default value for it.org.mule.metadata.api.model.MetadataTypegetType()This method will also traverse the complex parameters in each component.recursiveSpliterator(AstTraversalDirection direction) This method will also traverse the complex parameters in each component.This method will also traverse the complex parameters in each component.recursiveStream(AstTraversalDirection direction) This method will also traverse the complex parameters in each component.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.mule.runtime.ast.api.ComponentAst
directChildrenStreamByIdentifier
-
Constructor Details
-
BaseComponentAstDecorator
Creates a new decorator for the provided instance.- Parameters:
decorated- theComponentAstinstance to decorate.
-
-
Method Details
-
getDecorated
- Returns:
- the decorated
ComponentAstinstance.
-
recursiveStream
Description copied from interface:ComponentAstThis method will also traverse the complex parameters in each component.- Specified by:
recursiveStreamin interfaceComponentAst- Parameters:
direction- the @{link AstTraversalDirection} used to navigate the whole AST.- Returns:
- a
Streamfor this component and its children recursively that navigates the whole AST using the given @{code direction}.
-
recursiveStream
Description copied from interface:ComponentAstThis method will also traverse the complex parameters in each component.- Specified by:
recursiveStreamin interfaceComponentAst- Returns:
- a
Streamfor this component and its children recursively that navigates the whole AST usingTOP_DOWNdirection.
-
recursiveSpliterator
Description copied from interface:ComponentAstThis method will also traverse the complex parameters in each component.- Specified by:
recursiveSpliteratorin interfaceComponentAst- Returns:
- a
Spliteratorfor this component and its children recursively that navigates the whole AST usingTOP_DOWNdirection.
-
recursiveSpliterator
Description copied from interface:ComponentAstThis method will also traverse the complex parameters in each component.- Specified by:
recursiveSpliteratorin interfaceComponentAst- Parameters:
direction- the @{link AstTraversalDirection} used to navigate the whole AST.- Returns:
- a
Spliteratorfor this component and its children recursively that navigates the whole AST using the given @{code direction}.
-
directChildren
Description copied from interface:ComponentAstThis method will NOT traverse any complex parameters this component has.- Specified by:
directChildrenin interfaceComponentAst- Returns:
- a
Listfor this component's children.
-
directChildrenStream
- Specified by:
directChildrenStreamin interfaceComponentAst- Returns:
- a
Streamfor this component's children.
-
directChildrenSpliterator
Description copied from interface:ComponentAstThis method will NOT traverse any complex parameters this component has.- Specified by:
directChildrenSpliteratorin interfaceComponentAst- Returns:
- a
Spliteratorfor this component's children.
-
getParameters
Description copied from interface:ComponentAstA parameter may have a value either because it is explicitly set in the DSL, or because the extension model defines a default value for it.- Specified by:
getParametersin interfaceComponentAst- Returns:
- the ASTs of all the parameters, even if they don't have a value.
-
getParameter
- Specified by:
getParameterin interfaceComponentAst- Parameters:
groupName- the name of the parameterGroup to get AST for.paramName- the name of the parameter to get AST for.- Returns:
- the AST of the parameter, or null if there is no parameter with the given
groupNameandparamName.
-
getExtensionModel
public org.mule.runtime.api.meta.model.ExtensionModel getExtensionModel()- Specified by:
getExtensionModelin interfaceComponentAst- Returns:
- the extension model that declares the model this component represents.
-
getModel
Description copied from interface:ComponentAstA component may be represented by different kinds of models, depending on the actual type of this component. Possible values may be, for instance, instances ofConfigurationModel,ComponentModelorConnectionProviderModel(but not necessarily limited to those).- Specified by:
getModelin interfaceComponentAst- Parameters:
modelClass- the class of the model this method should return.- Returns:
- the model that represents this component.
-
getType
public org.mule.metadata.api.model.MetadataType getType()- Specified by:
getTypein interfaceComponentAst- Returns:
- the type that represents this component, if it is represented by a type.
-
getAnnotations
Description copied from interface:ComponentAstAn annotation is defined by the DSL processor that creates the instances ofComponentAst.- Specified by:
getAnnotationsin interfaceComponentAst- Returns:
- a
Mapcontaining the annotations for this component.
-
getMetadata
- Specified by:
getMetadatain interfaceComponentAst- Returns:
- the parser metadata for this component.
-
getLocation
public org.mule.runtime.api.component.location.ComponentLocation getLocation()- Specified by:
getLocationin interfaceComponentAst- Returns:
- the location of the component in the configuration.
-
getIdentifier
public org.mule.runtime.api.component.ComponentIdentifier getIdentifier()- Specified by:
getIdentifierin interfaceComponentAst- Returns:
- the identifier for the configuration element this object represents.
-
getComponentType
public org.mule.runtime.api.component.TypedComponentIdentifier.ComponentType getComponentType()- Specified by:
getComponentTypein interfaceComponentAst- Returns:
- a general typification of the role of this component.
-
getComponentId
- Specified by:
getComponentIdin interfaceComponentAst- Returns:
- the id of this component if it has one defined, or
emptyotherwise.
-
getGenerationInformation
- Specified by:
getGenerationInformationin interfaceComponentAst- Returns:
- an object containing information about the generation of this component.
-
toString
-