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<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 syntheticCopyright © 2003–2020 MuleSoft, Inc.. All rights reserved.