use of io.micronaut.inject.ast.beans.BeanElement in project micronaut-core by micronaut-projects.
the class JavaVisitorContext method printMessage.
private void printMessage(String message, Diagnostic.Kind kind, @Nullable io.micronaut.inject.ast.Element element) {
if (StringUtils.isNotEmpty(message)) {
if (element instanceof BeanElement) {
element = ((BeanElement) element).getDeclaringClass();
}
if (element instanceof AbstractJavaElement) {
Element el = (Element) element.getNativeType();
messager.printMessage(kind, message, el);
} else {
messager.printMessage(kind, message);
}
}
}
Aggregations