use of org.mule.runtime.extension.api.annotation.ConfigReferences in project mule by mulesoft.
the class ParameterAllowedStereotypesDeclarionEnricher method getStereotypes.
private List<StereotypeModel> getStereotypes(AnnotatedElement element) {
ConfigReferences references = element.getAnnotation(ConfigReferences.class);
if (references != null) {
return stream(references.value()).map(ref -> newStereotype(ref.name(), ref.namespace()).withParent(CONFIG).build()).collect(toList());
}
ConfigReference ref = element.getAnnotation(ConfigReference.class);
if (ref != null) {
return singletonList(newStereotype(ref.name(), ref.namespace()).withParent(CONFIG).build());
}
if (element.getAnnotation(FlowReference.class) != null) {
return singletonList(FLOW);
}
if (element.getAnnotation(ObjectStoreReference.class) != null) {
return singletonList(OBJECT_STORE);
}
return emptyList();
}
Aggregations