Package org.jboss.logging.processor.apt
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 String
private final String
private final String
private final ReportType
Fields inherited from class org.jboss.logging.processor.apt.AbstractGenerator
processingEnv
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate BufferedWriter
createWriter
(String packageName, String fileName) private static Collection<MessageMethod>
getSortedMessageMethods
(MessageInterface messageInterface) Returns a sorted collection of the message methods on the interface.void
processTypeElement
(TypeElement annotation, TypeElement element, MessageInterface messageInterface) Processes a type element.Methods inherited from class org.jboss.logging.processor.apt.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:AbstractGenerator
Processes a type element.- Specified by:
processTypeElement
in 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
-