Class AbstractCallingContext.Builder<B extends AbstractCallingContext.Builder<B,T>,T extends CallingContext>

java.lang.Object
io.helidon.pico.api.CallingContext
io.helidon.pico.api.AbstractCallingContext.Builder<B,T>
Type Parameters:
B - the type of the builder
T - the type of the built instance
All Implemented Interfaces:
Builder<B,T>, Supplier<T>
Direct Known Subclasses:
DefaultCallingContext.Builder
Enclosing class:
AbstractCallingContext

public abstract static class AbstractCallingContext.Builder<B extends AbstractCallingContext.Builder<B,T>,T extends CallingContext> extends CallingContext implements Builder<B,T>
Fluent API builder for T.
  • Constructor Details

    • Builder

      protected Builder()
      Fluent API builder constructor.
  • Method Details

    • trace

      public StackTraceElement[] trace()
      Description copied from class: CallingContext
      Only populated when PicoServicesConfig.TAG_DEBUG is set.
      Specified by:
      trace in class CallingContext
      Returns:
      the stack trace for who initialized
    • moduleName

      public Optional<String> moduleName()
      Description copied from class: CallingContext
      Only populated when PicoServicesConfig.TAG_MODULE_NAME is set.
      Specified by:
      moduleName in class CallingContext
      Returns:
      the module name
    • threadName

      public String threadName()
      Description copied from class: CallingContext
      The thread that created the calling context.
      Specified by:
      threadName in class CallingContext
      Returns:
      thread creating the calling context
    • trace

      public B trace(StackTraceElement[] val)
      Setter for 'trace'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • moduleName

      public B moduleName(Optional<String> val)
      Setter for 'moduleName'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • moduleName

      public B moduleName(String val)
      Setter for 'moduleName'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • threadName

      public B threadName(String val)
      Setter for 'threadName'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • accept

      public B accept(T val)
      Accept and update from the provided value object.
      Parameters:
      val - the value object to copy from
      Returns:
      this instance typed to correct type
    • visitAttributes

      public <T> void visitAttributes(AttributeVisitor<T> visitor, T userDefinedCtx)
      Visits all attributes of io.helidon.pico.api.CallingContext, calling the AttributeVisitor for each.
      Type Parameters:
      T - type of the user defined context
      Parameters:
      visitor - the visitor called for each attribute
      userDefinedCtx - any object you wish to pass to each visit call