use of org.mule.runtime.module.extension.internal.loader.java.property.ImplementingParameterModelProperty in project mule by mulesoft.
the class IntrospectionUtils method getAnnotatedElement.
public static java.util.Optional<AnnotatedElement> getAnnotatedElement(BaseDeclaration<?> declaration) {
final java.util.Optional<DeclaringMemberModelProperty> declaringMember = declaration.getModelProperty(DeclaringMemberModelProperty.class);
final java.util.Optional<ImplementingParameterModelProperty> implementingParameter = declaration.getModelProperty(ImplementingParameterModelProperty.class);
AnnotatedElement annotatedElement = null;
if (declaringMember.isPresent()) {
annotatedElement = declaringMember.get().getDeclaringField();
}
if (implementingParameter.isPresent()) {
annotatedElement = implementingParameter.get().getParameter();
}
return java.util.Optional.ofNullable(annotatedElement);
}
Aggregations