Class ReportFileGenerator
java.lang.Object
org.jboss.logging.processor.apt.AbstractGenerator
org.jboss.logging.processor.apt.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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final String(package private) static final String(package private) static final Stringprivate final Stringprivate final Stringprivate final ReportTypeFields inherited from class AbstractGenerator
processingEnv -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate BufferedWritercreateWriter(String packageName, String fileName) private static Collection<MessageMethod> getSortedMessageMethods(MessageInterface messageInterface) Returns a sorted collection of the message methods on the interface.voidprocessTypeElement(TypeElement annotation, TypeElement element, MessageInterface messageInterface) Processes a type element.Methods inherited from class AbstractGenerator
getName, getSupportedOptions, logger
-
Field Details
-
REPORT_TYPE
- See Also:
-
REPORT_PATH
- See Also:
-
REPORT_TITLE
- See Also:
-
reportType
-
reportPath
-
reportTitle
-
-
Constructor Details
-
ReportFileGenerator
ReportFileGenerator(ProcessingEnvironment processingEnv)
-
-
Method Details
-
processTypeElement
public void processTypeElement(TypeElement annotation, TypeElement element, MessageInterface messageInterface) Description copied from class:AbstractGeneratorProcesses a type element.- Specified by:
processTypeElementin classAbstractGenerator- Parameters:
annotation- the annotation who trigger the processingelement- the element that contains the methods.messageInterface- the message interface to implement.
-
createWriter
- Throws:
IOException
-
getSortedMessageMethods
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
-