- All Known Implementing Classes:
CodegenEvent.BuilderBase.CodegenEventImpl
public interface CodegenEvent
An event happening during code gen to be logged with
CodegenLogger.log(CodegenEvent)
.
This is not a fast solution, it is only to be used when processing code, where
we can have a bit of an overhead!- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Fluent API builder forCodegenEvent
.static class
Fluent API builder base forCodegenEvent
. -
Method Summary
Modifier and TypeMethodDescriptionstatic CodegenEvent.Builder
builder()
Create a new fluent API builder to customize configuration.static CodegenEvent.Builder
builder
(CodegenEvent instance) Create a new fluent API builder from an existing instance.level()
Level can be used directly (command line tools), mapped to Maven level (maven plugins), or mapped to diagnostics kind (annotation processing).message()
Message to be delivered to the user.objects()
Additional information, such as source elements.Throwable if available.
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance
- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
level
System.Logger.Level level()Level can be used directly (command line tools), mapped to Maven level (maven plugins), or mapped to diagnostics kind (annotation processing).Mapping table:
Level mappings Level Maven log level APT Diagnostic.Kind ERROR error ERROR WARNING warn WARNING INFO info NOTE DEBUG, TRACE debug N/A - only logged to logger - Returns:
- level to use, defaults to INFO
-
message
String message()Message to be delivered to the user.- Returns:
- the message
-
throwable
Throwable if available.- Returns:
- throwable
-
objects
Additional information, such as source elements. These may or may not be ignored by the final log destination.Expected supported types:
- APT:
Element
,AnnotationMirror
,AnnotationValue
- Classpath scanning:
ClassInfo
,MethodInfo
etc. - Any environment:
TypeName
,TypeInfo
, orTypedElementInfo
- Returns:
- list of objects causing this event to happen
- APT:
-