Class InjectionServicesConfig.BuilderBase<BUILDER extends InjectionServicesConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends InjectionServicesConfig>

java.lang.Object
io.helidon.inject.api.InjectionServicesConfig.BuilderBase<BUILDER,PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>, Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
InjectionServicesConfig.Builder
Enclosing interface:
InjectionServicesConfig

public abstract static class InjectionServicesConfig.BuilderBase<BUILDER extends InjectionServicesConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends InjectionServicesConfig> extends Object implements Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for InjectionServicesConfig.
  • Constructor Details

    • BuilderBase

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

    • from

      public BUILDER from(InjectionServicesConfig 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(InjectionServicesConfig.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
    • config

      public BUILDER config(Config config)
      Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.
      Specified by:
      config in interface Prototype.ConfiguredBuilder<BUILDER extends InjectionServicesConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends InjectionServicesConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • clearProviderName

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

      public BUILDER providerName(String providerName)
      The provider implementation name.
      Parameters:
      providerName - the provider implementation name
      Returns:
      updated builder instance
      See Also:
    • clearProviderVersion

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

      public BUILDER providerVersion(String providerVersion)
      The provider implementation version.
      Parameters:
      providerVersion - the provider implementation version
      Returns:
      updated builder instance
      See Also:
    • activationDeadlockDetectionTimeout

      public BUILDER activationDeadlockDetectionTimeout(Duration activationDeadlockDetectionTimeout)
      The deadlock detection timeout in millis.
      Parameters:
      activationDeadlockDetectionTimeout - the deadlock detection timeout
      Returns:
      updated builder instance
      See Also:
    • shutdownTimeout

      public BUILDER shutdownTimeout(Duration shutdownTimeout)
      Shutdown timeout.
      Parameters:
      shutdownTimeout - shutdown timeout
      Returns:
      updated builder instance
      See Also:
    • activationLogs

      public BUILDER activationLogs(boolean activationLogs)
      Flag indicating whether activation logs are captured, recorded, and retained.
      Parameters:
      activationLogs - the flag indicating whether activation logs are captured and retained
      Returns:
      updated builder instance
      See Also:
    • serviceLookupCaching

      public BUILDER serviceLookupCaching(boolean serviceLookupCaching)
      Flag indicating whether service lookups (i.e., via Services.lookup(java.lang.Class<T>)) are cached.
      Parameters:
      serviceLookupCaching - the flag indicating whether service lookups are cached
      Returns:
      updated builder instance
      See Also:
    • permitsDynamic

      public BUILDER permitsDynamic(boolean permitsDynamic)
      Flag indicating whether the services registry permits dynamic behavior. The default implementation of Injection supports dynamic (see supportsDynamic()), but does not permit it by default.
      Parameters:
      permitsDynamic - the flag indicating whether the services registry supports dynamic updates of the service registry
      Returns:
      updated builder instance
      See Also:
    • supportsDynamic

      public BUILDER supportsDynamic(boolean supportsDynamic)
      Flag indicating whether the services registry supports dynamic behavior. Note that if the provider does not support this flag then permitting it via permitsDynamic() will have no affect. The default implementation of Injection supports dynamic, but does not permit it by default.
      Parameters:
      supportsDynamic - the flag indicating whether the services registry supports dynamic updates of the service registry post startup
      Returns:
      updated builder instance
      See Also:
    • permitsReflection

      public BUILDER permitsReflection(boolean permitsReflection)
      Flag indicating whether reflection is permitted. The default implementation of Injection supports reflection at compile-time only, and is not controlled by this flag directly.
      Parameters:
      permitsReflection - the flag indicating whether the provider is permitted to use reflection for normal runtime usage
      Returns:
      updated builder instance
      See Also:
    • supportsReflection

      public BUILDER supportsReflection(boolean supportsReflection)
      Flag indicating whether the reflection is supported. Note that if the provider does not support this flag then permitting it via permitsReflection() will have no affect. The default implementation of Injection supports reflection only during compile-time operations using the Injection maven-plugin.
      Parameters:
      supportsReflection - the flag indicating whether reflection is supported during runtime operations
      Returns:
      updated builder instance
      See Also:
    • usesCompileTimeApplications

      public BUILDER usesCompileTimeApplications(boolean usesCompileTimeApplications)
      Flag indicating whether compile-time generated Application's should be used at Injection's startup initialization. Setting this value to false will have no affect if the underlying provider does not support compile-time generation via supportsCompileTime().
      Parameters:
      usesCompileTimeApplications - the flag indicating whether the provider is permitted to use Application generated code from compile-time
      Returns:
      updated builder instance
      See Also:
    • usesCompileTimeModules

      public BUILDER usesCompileTimeModules(boolean usesCompileTimeModules)
      Flag indicating whether compile-time generated ModuleComponent's should be used at Injection's startup initialization. Setting this value to false will have no affect if the underlying provider does not support compile-time generation via supportsCompileTime().
      Parameters:
      usesCompileTimeModules - the flag indicating whether the provider is permitted to use Application generated code from compile-time
      Returns:
      updated builder instance
      See Also:
    • supportsCompileTime

      public BUILDER supportsCompileTime(boolean supportsCompileTime)
      Flag indicating whether the dependency injection model for the Application and Activator is capable for being produced at compile-time, and therefore used/loaded during runtime operations.
      Parameters:
      supportsCompileTime - the flag indicating whether the provider supports compile-time code generation of DI artifacts
      Returns:
      updated builder instance
      See Also:
    • usesJsr330

      public BUILDER usesJsr330(boolean usesJsr330)
      Flag indicating whether jsr330 specification will be used and enforced.
      Parameters:
      usesJsr330 - the flag indicating whether strict jsr330 specification will be enforced
      Returns:
      updated builder instance
      See Also:
    • supportsJsr330

      public BUILDER supportsJsr330(boolean supportsJsr330)
      Flag indicating whether jsr330 is supported by the provider implementation.
      Parameters:
      supportsJsr330 - the flag indicating whether the provider supports the jsr330 specification
      Returns:
      updated builder instance
      See Also:
    • supportsJsr330Statics

      public BUILDER supportsJsr330Statics(boolean supportsJsr330Statics)
      Flag indicating whether jsr330 is supported by the provider implementation for the use on static injection points.
      Parameters:
      supportsJsr330Statics - the flag indicating whether the provider supports the jsr330 specification for the use of static injection points
      Returns:
      updated builder instance
      See Also:
    • supportsJsr330Privates

      public BUILDER supportsJsr330Privates(boolean supportsJsr330Privates)
      Flag indicating whether jsr330 is supported by the provider implementation for the use on private injection points.
      Parameters:
      supportsJsr330Privates - the flag indicating whether the provider supports the jsr330 specification for the use of private injection points
      Returns:
      updated builder instance
      See Also:
    • supportsContextualLookup

      public BUILDER supportsContextualLookup(boolean supportsContextualLookup)
      Flag indicating whether contextual lookup is supported via Services.contextualServices(InjectionPointInfo).
      Parameters:
      supportsContextualLookup - the flag indicating whether the provider supports contextual lookup
      Returns:
      updated builder instance
      See Also:
    • clearDebug

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

      public BUILDER debug(boolean debug)
      Whether debug is enabled. Defaults to false, can be overridden using system property InjectionServices.TAG_DEBUG.
      Parameters:
      debug - if debug should be enabled
      Returns:
      updated builder instance
      See Also:
    • providerName

      public Optional<String> providerName()
      The provider implementation name.
      Returns:
      the provider name
    • providerVersion

      public Optional<String> providerVersion()
      The provider implementation version.
      Returns:
      the provider version
    • activationDeadlockDetectionTimeout

      public Duration activationDeadlockDetectionTimeout()
      The deadlock detection timeout in millis.
      Returns:
      the activation deadlock detection timeout
    • shutdownTimeout

      public Duration shutdownTimeout()
      Shutdown timeout.
      Returns:
      the shutdown timeout
    • activationLogs

      public boolean activationLogs()
      Flag indicating whether activation logs are captured, recorded, and retained.
      Returns:
      the activation logs
    • serviceLookupCaching

      public boolean serviceLookupCaching()
      Flag indicating whether service lookups (i.e., via Services.lookup(java.lang.Class<T>)) are cached.
      Returns:
      the service lookup caching
    • permitsDynamic

      public boolean permitsDynamic()
      Flag indicating whether the services registry permits dynamic behavior. The default implementation of Injection supports dynamic (see supportsDynamic()), but does not permit it by default.
      Returns:
      the permits dynamic
    • supportsDynamic

      public boolean supportsDynamic()
      Flag indicating whether the services registry supports dynamic behavior. Note that if the provider does not support this flag then permitting it via permitsDynamic() will have no affect. The default implementation of Injection supports dynamic, but does not permit it by default.
      Returns:
      the supports dynamic
    • permitsReflection

      public boolean permitsReflection()
      Flag indicating whether reflection is permitted. The default implementation of Injection supports reflection at compile-time only, and is not controlled by this flag directly.
      Returns:
      the permits reflection
    • supportsReflection

      public boolean supportsReflection()
      Flag indicating whether the reflection is supported. Note that if the provider does not support this flag then permitting it via permitsReflection() will have no affect. The default implementation of Injection supports reflection only during compile-time operations using the Injection maven-plugin.
      Returns:
      the supports reflection
    • usesCompileTimeApplications

      public boolean usesCompileTimeApplications()
      Flag indicating whether compile-time generated Application's should be used at Injection's startup initialization. Setting this value to false will have no affect if the underlying provider does not support compile-time generation via supportsCompileTime().
      Returns:
      the uses compile time applications
      See Also:
    • usesCompileTimeModules

      public boolean usesCompileTimeModules()
      Flag indicating whether compile-time generated ModuleComponent's should be used at Injection's startup initialization. Setting this value to false will have no affect if the underlying provider does not support compile-time generation via supportsCompileTime().
      Returns:
      the uses compile time modules
      See Also:
    • supportsCompileTime

      public boolean supportsCompileTime()
      Flag indicating whether the dependency injection model for the Application and Activator is capable for being produced at compile-time, and therefore used/loaded during runtime operations.
      Returns:
      the supports compile time
    • usesJsr330

      public boolean usesJsr330()
      Flag indicating whether jsr330 specification will be used and enforced.
      Returns:
      the uses jsr330
    • supportsJsr330

      public boolean supportsJsr330()
      Flag indicating whether jsr330 is supported by the provider implementation.
      Returns:
      the supports jsr330
    • supportsJsr330Statics

      public boolean supportsJsr330Statics()
      Flag indicating whether jsr330 is supported by the provider implementation for the use on static injection points.
      Returns:
      the supports jsr330 statics
    • supportsJsr330Privates

      public boolean supportsJsr330Privates()
      Flag indicating whether jsr330 is supported by the provider implementation for the use on private injection points.
      Returns:
      the supports jsr330 privates
    • supportsContextualLookup

      public boolean supportsContextualLookup()
      Flag indicating whether contextual lookup is supported via Services.contextualServices(InjectionPointInfo).
      Returns:
      the supports contextual lookup
    • debug

      public Optional<Boolean> debug()
      Whether debug is enabled. Defaults to false, can be overridden using system property InjectionServices.TAG_DEBUG.
      Returns:
      the debug
    • config

      public Optional<Config> config()
      If this instance was configured, this would be the config instance used.
      Returns:
      config node used to configure this builder, or empty if not configured
    • toString

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

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

      protected void validatePrototype()
      Validates required properties.