Interface CodegenEvent

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:
  • Method Details

    • builder

      static CodegenEvent.Builder builder()
      Create a new fluent API builder to customize configuration.
      Returns:
      a new builder
    • builder

      static CodegenEvent.Builder builder(CodegenEvent instance)
      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

      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

      Optional<Throwable> throwable()
      Throwable if available.
      Returns:
      throwable
    • objects

      List<Object> objects()
      Additional information, such as source elements. These may or may not be ignored by the final log destination.

      Expected supported types:

      Returns:
      list of objects causing this event to happen