use of org.mule.runtime.extension.api.annotation.param.display.Path in project mule by mulesoft.
the class DisplayDeclarationEnricher method enrichDeclaration.
private void enrichDeclaration(BaseDeclaration declaration, WithAnnotations annotatedElement) {
if (annotatedElement != null) {
final Summary summaryAnnotation = annotatedElement.getAnnotation(Summary.class).orElse(null);
final DisplayName displayNameAnnotation = annotatedElement.getAnnotation(DisplayName.class).orElse(null);
final Example exampleAnnotation = annotatedElement.getAnnotation(Example.class).orElse(null);
final Path pathAnnotation = annotatedElement.getAnnotation(Path.class).orElse(null);
final ClassValue classValue = annotatedElement.getAnnotation(ClassValue.class).orElse(null);
createDisplayModelProperty(declaration, summaryAnnotation, displayNameAnnotation, exampleAnnotation, pathAnnotation, classValue);
}
}
use of org.mule.runtime.extension.api.annotation.param.display.Path in project mule by mulesoft.
the class DisplayDeclarationEnricher method enrichTypes.
private void enrichTypes(BaseDeclaration declaration) {
final Optional<ImplementingTypeModelProperty> modelProperty = declaration.getModelProperty(ImplementingTypeModelProperty.class);
if (modelProperty.isPresent()) {
final Class<?> annotatedType = modelProperty.get().getType();
final Summary summaryAnnotation = getAnnotation(annotatedType, Summary.class);
final DisplayName displayNameAnnotation = getAnnotation(annotatedType, DisplayName.class);
final Example exampleAnnotation = getAnnotation(annotatedType, Example.class);
final Path pathAnnotation = getAnnotation(annotatedType, Path.class);
final ClassValue classAnnotation = getAnnotation(annotatedType, ClassValue.class);
createDisplayModelProperty(declaration, summaryAnnotation, displayNameAnnotation, exampleAnnotation, pathAnnotation, classAnnotation);
}
}
Aggregations