Class CodegenEvent.BuilderBase<BUILDER extends CodegenEvent.BuilderBase<BUILDER>>

java.lang.Object
io.helidon.codegen.CodegenEvent.BuilderBase<BUILDER>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
All Implemented Interfaces:
Builder<BUILDER,CodegenEvent>, Supplier<CodegenEvent>
Direct Known Subclasses:
CodegenEvent.Builder
Enclosing interface:
CodegenEvent

public abstract static class CodegenEvent.BuilderBase<BUILDER extends CodegenEvent.BuilderBase<BUILDER>> extends Object implements Builder<BUILDER,CodegenEvent>
Fluent API builder base for CodegenEvent.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(CodegenEvent prototype)
      Update this builder from an existing prototype instance.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(CodegenEvent.BuilderBase<?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • level

      public BUILDER 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
      Parameters:
      level - level to use, defaults to INFO
      Returns:
      updated builder instance
      See Also:
    • message

      public BUILDER message(String message)
      Message to be delivered to the user.
      Parameters:
      message - the message
      Returns:
      updated builder instance
      See Also:
    • clearThrowable

      public BUILDER clearThrowable()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • throwable

      public BUILDER throwable(Throwable throwable)
      Throwable if available.
      Parameters:
      throwable - throwable
      Returns:
      updated builder instance
      See Also:
    • objects

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

      Expected supported types:

      Parameters:
      objects - list of objects causing this event to happen
      Returns:
      updated builder instance
      See Also:
    • addObjects

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

      Expected supported types:

      Parameters:
      objects - list of objects causing this event to happen
      Returns:
      updated builder instance
      See Also:
    • addObject

      public BUILDER addObject(Object object)
      Additional information, such as source elements. These may or may not be ignored by the final log destination.

      Expected supported types:

      Parameters:
      object - list of objects causing this event to happen
      Returns:
      updated builder instance
      See Also:
    • level

      public 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:
      the level
    • message

      public Optional<String> message()
      Message to be delivered to the user.
      Returns:
      the message
    • throwable

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

      public 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:
      the objects
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.