Class ReportFileGenerator


  • @SupportedOptions({"org.jboss.logging.tools.report.type","org.jboss.logging.tools.report.path","org.jboss.logging.tools.report.title"})
    public class ReportFileGenerator
    extends AbstractGenerator
    Generates reports for logging interfaces and message bundles.
    • Field Detail

      • reportPath

        private final java.lang.String reportPath
      • reportTitle

        private final java.lang.String reportTitle
    • Constructor Detail

      • ReportFileGenerator

        ReportFileGenerator​(javax.annotation.processing.ProcessingEnvironment processingEnv)
    • Method Detail

      • processTypeElement

        public void processTypeElement​(javax.lang.model.element.TypeElement annotation,
                                       javax.lang.model.element.TypeElement element,
                                       MessageInterface messageInterface)
        Description copied from class: AbstractGenerator
        Processes a type element.
        Specified by:
        processTypeElement in class AbstractGenerator
        Parameters:
        annotation - the annotation who trigger the processing
        element - the element that contains the methods.
        messageInterface - the message interface to implement.
      • createWriter

        private java.io.BufferedWriter createWriter​(java.lang.String packageName,
                                                    java.lang.String fileName)
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • getSortedMessageMethods

        private static java.util.Collection<MessageMethod> getSortedMessageMethods​(MessageInterface messageInterface)
        Returns a sorted collection of the message methods on the interface. The methods are sorted by the message id.
        Parameters:
        messageInterface - the message interface to get the methods for
        Returns:
        a sorted collection of message methods