Class Diagnostics.Report

java.lang.Object
be.imgn.gaia.processing.Diagnostics.Report
Enclosing class:
Diagnostics

public final class Diagnostics.Report extends Object
A report about an element, possibly narrowed to one of its annotations and one attribute of it.
  • Method Details

    • annotation

      public Diagnostics.Report annotation(AnnotationMirror annotation)
      Narrows this report to an annotation of the element.
      Parameters:
      annotation - the annotation, as found on the element
      Returns:
      the narrowed report
    • annotation

      public Diagnostics.Report annotation(String qualifiedName)
      Narrows this report to the annotation of the element of a type.
      Parameters:
      qualifiedName - the fully qualified name of the annotation type
      Returns:
      the narrowed report
      Throws:
      IllegalArgumentException - if the element has no such annotation
    • attribute

      public Diagnostics.Report attribute(String name)
      Narrows this report to an attribute of the annotation. If the annotation does not write the attribute, leaving it to its default, the report stays on the annotation.
      Parameters:
      name - the name of the attribute
      Returns:
      the narrowed report
      Throws:
      IllegalStateException - if the report is not narrowed to an annotation yet
      IllegalArgumentException - if the annotation has no such attribute
    • error

      public void error(String message)
      Reports an error, which makes the compilation fail.
      Parameters:
      message - the message
    • warning

      public void warning(String message)
      Reports a warning.
      Parameters:
      message - the message
    • note

      public void note(String message)
      Reports a note.
      Parameters:
      message - the message