public abstract class AbstractAnnotatedDeclarationEnricher extends Object implements org.mule.runtime.extension.api.loader.DeclarationEnricher
DeclarationEnricher which provides utility methods for enriching
declarations constructed from annotated java classes| Constructor and Description |
|---|
AbstractAnnotatedDeclarationEnricher() |
| Modifier and Type | Method and Description |
|---|---|
protected <A extends Annotation> |
extractAnnotation(org.mule.runtime.api.meta.model.declaration.fluent.BaseDeclaration<? extends org.mule.runtime.api.meta.model.declaration.fluent.BaseDeclaration> declaration,
Class<A> annotationType)
Extracts an
Annotation from class backing the declaration. |
protected Optional<ExtensionParameter> |
extractDeclaredParameter(org.mule.runtime.api.meta.model.declaration.fluent.ParameterDeclaration declaration)
If the parameter was derived from a Java field or method argument, this method returns an
ExtensionParameter which
provides an abstraction over that field or argument |
protected <T extends org.mule.runtime.api.meta.model.declaration.fluent.ExecutableComponentDeclaration> |
extractImplementingMethod(org.mule.runtime.api.meta.model.declaration.fluent.ExecutableComponentDeclaration<T> declaration)
If the operation was derived from a Java method, this method extracts and returns it.
|
protected Optional<Class> |
extractImplementingType(org.mule.runtime.api.meta.model.declaration.fluent.BaseDeclaration<? extends org.mule.runtime.api.meta.model.declaration.fluent.BaseDeclaration> declaration) |
protected Optional<ImplementingTypeModelProperty> |
extractImplementingTypeProperty(org.mule.runtime.api.meta.model.declaration.fluent.BaseDeclaration<? extends org.mule.runtime.api.meta.model.declaration.fluent.BaseDeclaration> declaration)
Returns the annotated
Class that was used to construct the declaration. |
protected Optional<Type> |
extractType(org.mule.runtime.api.meta.model.declaration.fluent.BaseDeclaration<? extends org.mule.runtime.api.meta.model.declaration.fluent.BaseDeclaration> declaration) |
public AbstractAnnotatedDeclarationEnricher()
protected <A extends Annotation> A extractAnnotation(org.mule.runtime.api.meta.model.declaration.fluent.BaseDeclaration<? extends org.mule.runtime.api.meta.model.declaration.fluent.BaseDeclaration> declaration, Class<A> annotationType)
Annotation from class backing the declaration.
This method works in conjunction with extractImplementingTypeProperty(BaseDeclaration)A - the annotation's generic typedeclaration - a BaseDeclaration to be enrichedannotationType - the type of the annotation you wantAnnotation or null if the annotation is not present or the declaration doesn't have a
backing annotated typeprotected Optional<ImplementingTypeModelProperty> extractImplementingTypeProperty(org.mule.runtime.api.meta.model.declaration.fluent.BaseDeclaration<? extends org.mule.runtime.api.meta.model.declaration.fluent.BaseDeclaration> declaration)
Class that was used to construct the declaration.
The annotated type is determined by querying the declaration for the ImplementingTypeModelProperty model
propertydeclaration - a BaseDeclaration to be enrichedClass or null if the model doesn't have a ImplementingTypeModelPropertyprotected Optional<Class> extractImplementingType(org.mule.runtime.api.meta.model.declaration.fluent.BaseDeclaration<? extends org.mule.runtime.api.meta.model.declaration.fluent.BaseDeclaration> declaration)
declaration - a BaseDeclarationdeclaration was derived or Optional.empty() if it couldn't be determined or
the declaration is syntheticprotected Optional<Type> extractType(org.mule.runtime.api.meta.model.declaration.fluent.BaseDeclaration<? extends org.mule.runtime.api.meta.model.declaration.fluent.BaseDeclaration> declaration)
declaration - a BaseDeclarationdeclaration was derived or Optional.empty() if it couldn't be determined or
the declaration is syntheticprotected <T extends org.mule.runtime.api.meta.model.declaration.fluent.ExecutableComponentDeclaration> Optional<Method> extractImplementingMethod(org.mule.runtime.api.meta.model.declaration.fluent.ExecutableComponentDeclaration<T> declaration)
protected Optional<ExtensionParameter> extractDeclaredParameter(org.mule.runtime.api.meta.model.declaration.fluent.ParameterDeclaration declaration)
ExtensionParameter which
provides an abstraction over that field or argumentdeclaration - the parameter's declarationExtensionParameterCopyright © 2003–2022 MuleSoft, Inc.. All rights reserved.