public final class MuleExtensionAnnotationParser extends Object
| Constructor and Description |
|---|
MuleExtensionAnnotationParser() |
| Modifier and Type | Method and Description |
|---|---|
static ExtensionInfo |
getExtensionInfo(Class<?> extensionType) |
static String |
getMemberName(org.mule.runtime.api.meta.model.declaration.fluent.BaseDeclaration<?> declaration,
String defaultName) |
static List<String> |
getParamNames(Method method) |
static <R extends Annotation,S extends Annotation,T> |
mapReduceAnnotation(WithAnnotations element,
Class<R> legacyAnnotationClass,
Class<S> sdkAnnotationClass,
Function<AnnotationValueFetcher<R>,T> legacyAnnotationMapping,
Function<AnnotationValueFetcher<S>,T> sdkAnnotationMapping,
Supplier<? extends org.mule.runtime.extension.api.exception.IllegalModelDefinitionException> dualDefinitionExceptionFactory)
Monad for extracting information from a
WithAnnotations element which might be annotated with two different
annotations of similar semantics. |
static <L extends Annotation,A extends Annotation,T> |
mapReduceRepeatableAnnotation(WithAnnotations element,
Class<L> legacyAnnotationType,
Class<A> sdkApiAnnotationType,
Function<Annotation,L[]> legacyContainerMapping,
Function<Annotation,A[]> sdkApiContainerMapping,
Function<AnnotationValueFetcher<L>,T> legacyMapping,
Function<AnnotationValueFetcher<A>,T> sdkApiMapping) |
static <T extends Annotation> |
mapReduceRepeatableAnnotation(WithAnnotations element,
Class<T> annotation,
Function<Annotation,T[]> containerMapper) |
static <R extends Annotation,S extends Annotation,T> |
mapReduceSingleAnnotation(ExtensionElement extensionElement,
Class<R> legacyAnnotationClass,
Class<S> sdkAnnotationClass,
Function<AnnotationValueFetcher<R>,T> legacyAnnotationMapping,
Function<AnnotationValueFetcher<S>,T> sdkAnnotationMapping)
Monad for extracting information from an
ExtensionElement element which might be annotated with two different
annotations of similar semantics. |
static <R extends Annotation,S extends Annotation,T> |
mapReduceSingleAnnotation(WithAnnotations element,
String elementType,
String elementName,
Class<R> legacyAnnotationClass,
Class<S> sdkAnnotationClass,
Function<AnnotationValueFetcher<R>,T> legacyAnnotationMapping,
Function<AnnotationValueFetcher<S>,T> sdkAnnotationMapping) |
static Optional<org.mule.runtime.api.meta.model.display.LayoutModel> |
parseLayoutAnnotations(AnnotatedElement annotatedElement,
org.mule.runtime.api.meta.model.display.LayoutModel.LayoutModelBuilder builder,
String elementName) |
static Optional<org.mule.runtime.api.meta.model.display.LayoutModel> |
parseLayoutAnnotations(AnnotatedElement annotatedElement,
String elementName) |
static Optional<org.mule.runtime.api.meta.model.display.LayoutModel> |
parseLayoutAnnotations(WithAnnotations annotatedElement,
org.mule.runtime.api.meta.model.display.LayoutModel.LayoutModelBuilder builder,
String elementName) |
static Optional<org.mule.runtime.api.meta.model.display.LayoutModel> |
parseLayoutAnnotations(WithAnnotations annotatedElement,
String elementName) |
static Map<Class<? extends Annotation>,Annotation> |
toMap(Annotation[] annotations) |
public static String getMemberName(org.mule.runtime.api.meta.model.declaration.fluent.BaseDeclaration<?> declaration, String defaultName)
public static ExtensionInfo getExtensionInfo(Class<?> extensionType)
public static <L extends Annotation,A extends Annotation,T> Stream<T> mapReduceRepeatableAnnotation(WithAnnotations element, Class<L> legacyAnnotationType, Class<A> sdkApiAnnotationType, Function<Annotation,L[]> legacyContainerMapping, Function<Annotation,A[]> sdkApiContainerMapping, Function<AnnotationValueFetcher<L>,T> legacyMapping, Function<AnnotationValueFetcher<A>,T> sdkApiMapping)
public static <T extends Annotation> Stream<AnnotationValueFetcher<T>> mapReduceRepeatableAnnotation(WithAnnotations element, Class<T> annotation, Function<Annotation,T[]> containerMapper)
public static Map<Class<? extends Annotation>,Annotation> toMap(Annotation[] annotations)
public static Optional<org.mule.runtime.api.meta.model.display.LayoutModel> parseLayoutAnnotations(AnnotatedElement annotatedElement, String elementName)
public static Optional<org.mule.runtime.api.meta.model.display.LayoutModel> parseLayoutAnnotations(WithAnnotations annotatedElement, String elementName)
public static Optional<org.mule.runtime.api.meta.model.display.LayoutModel> parseLayoutAnnotations(WithAnnotations annotatedElement, org.mule.runtime.api.meta.model.display.LayoutModel.LayoutModelBuilder builder, String elementName)
public static Optional<org.mule.runtime.api.meta.model.display.LayoutModel> parseLayoutAnnotations(AnnotatedElement annotatedElement, org.mule.runtime.api.meta.model.display.LayoutModel.LayoutModelBuilder builder, String elementName)
public static <R extends Annotation,S extends Annotation,T> Optional<T> mapReduceSingleAnnotation(ExtensionElement extensionElement, Class<R> legacyAnnotationClass, Class<S> sdkAnnotationClass, Function<AnnotationValueFetcher<R>,T> legacyAnnotationMapping, Function<AnnotationValueFetcher<S>,T> sdkAnnotationMapping)
ExtensionElement element which might be annotated with two different
annotations of similar semantics. Both annotations types are reduced to a single output type.
Simultaneous presence of both types will be considered an error
R - Legacy annotation's generic typeS - New annotation's generic typeT - Output generic typeextensionElement - the extension elementlegacyAnnotationClass - the legacy annotation typesdkAnnotationClass - the new annotation typelegacyAnnotationMapping - mapping function for the legacy annotationsdkAnnotationMapping - mapping function for the new annotationpublic static <R extends Annotation,S extends Annotation,T> Optional<T> mapReduceSingleAnnotation(WithAnnotations element, String elementType, String elementName, Class<R> legacyAnnotationClass, Class<S> sdkAnnotationClass, Function<AnnotationValueFetcher<R>,T> legacyAnnotationMapping, Function<AnnotationValueFetcher<S>,T> sdkAnnotationMapping)
public static <R extends Annotation,S extends Annotation,T> Optional<T> mapReduceAnnotation(WithAnnotations element, Class<R> legacyAnnotationClass, Class<S> sdkAnnotationClass, Function<AnnotationValueFetcher<R>,T> legacyAnnotationMapping, Function<AnnotationValueFetcher<S>,T> sdkAnnotationMapping, Supplier<? extends org.mule.runtime.extension.api.exception.IllegalModelDefinitionException> dualDefinitionExceptionFactory)
WithAnnotations element which might be annotated with two different
annotations of similar semantics. Both annotations types are reduced to a single output type.
Simultaneous presence of both types will result in an Optional.empty() value
R - Legacy annotation's generic typeS - New annotation's generic typeT - Output generic typeelement - the annotated elementlegacyAnnotationClass - the legacy annotation typesdkAnnotationClass - the new annotation typelegacyAnnotationMapping - mapping function for the legacy annotationsdkAnnotationMapping - mapping function for the new annotationCopyright © 2003–2022 MuleSoft, Inc.. All rights reserved.