Class ArcConfig

java.lang.Object
io.quarkus.arc.deployment.ArcConfig

@ConfigRoot(phase=BUILD_TIME) public class ArcConfig extends Object
  • Field Details

    • ALLOWED_REMOVE_UNUSED_BEANS_VALUES

      public static final Set<String> ALLOWED_REMOVE_UNUSED_BEANS_VALUES
    • removeUnusedBeans

      @ConfigItem(defaultValue="all") public String removeUnusedBeans
      • If set to all (or true) the container will attempt to remove all unused beans.
      • If set to none (or false) no beans will ever be removed even if they are unused (according to the criteria set out below)
      • If set to fwk, then all unused beans will be removed, except the unused beans whose classes are declared in the application code

      An unused bean:

      • is not a built-in bean or interceptor,
      • is not eligible for injection to any injection point,
      • is not excluded by any extension,
      • does not have a name,
      • does not declare an observer,
      • does not declare any producer which is eligible for injection to any injection point,
      • is not directly eligible for injection into any Instance injection point
      See Also:
    • autoInjectFields

      @ConfigItem(defaultValue="true") public boolean autoInjectFields
      If set to true @Inject is automatically added to all non-static non-final fields that are annotated with one of the annotations defined by AutoInjectAnnotationBuildItem.
    • transformUnproxyableClasses

      @ConfigItem(defaultValue="true") public boolean transformUnproxyableClasses
      If set to true, the bytecode of unproxyable beans will be transformed. This ensures that a proxy/subclass can be created properly. If the value is set to false, then an exception is thrown at build time indicating that a subclass/proxy could not be created. Quarkus performs the following transformations when this setting is enabled:
      • Remove 'final' modifier from classes and methods when a proxy is required.
      • Create a no-args constructor if needed.
      • Makes private no-args constructors package-private if necessary. </ul
    • transformPrivateInjectedFields

      @ConfigItem(defaultValue="true") public boolean transformPrivateInjectedFields
      If set to true, the bytecode of private fields that are injection points will be transformed to package private. This ensures that field injection can be performed completely reflection-free. If the value is set to false, then a reflection fallback is used to perform the injection.
    • failOnInterceptedPrivateMethod

      @ConfigItem(defaultValue="true") public boolean failOnInterceptedPrivateMethod
      If set to true (the default), the build fails if a private method that is neither an observer nor a producer, is annotated with an interceptor binding. An example of this is the use of Transactional on a private method of a bean. If set to false, Quarkus simply logs a warning that the annotation will be ignored.
    • selectedAlternatives

      @ConfigItem public Optional<List<String>> selectedAlternatives
      The list of selected alternatives for an application.

      An element value can be:

      • a fully qualified class name, i.e. org.acme.Foo
      • a simple class name as defined by Class.getSimpleName(), i.e. Foo
      • a package name with suffix .*, i.e. org.acme.*, matches a package
      • a package name with suffix .**, i.e. org.acme.**, matches a package that starts with the value
      Each element value is used to match an alternative bean class, an alternative stereotype annotation type or a bean class that declares an alternative producer. If any value matches then the priority of Integer.MAX_VALUE is used for the relevant bean. The priority declared via Priority is overridden.
    • autoProducerMethods

      @ConfigItem(defaultValue="true") public boolean autoProducerMethods
      If set to true then jakarta.enterprise.inject.Produces is automatically added to all non-void methods that are annotated with a scope annotation, a stereotype or a qualifier, and are not annotated with Inject or Produces, and no parameter is annotated with Disposes, Observes or ObservesAsync.
    • excludeTypes

      @ConfigItem public Optional<List<String>> excludeTypes
      The list of types that should be excluded from discovery.

      An element value can be:

      • a fully qualified class name, i.e. org.acme.Foo
      • a simple class name as defined by Class.getSimpleName(), i.e. Foo
      • a package name with suffix .*, i.e. org.acme.*, matches a package
      • a package name with suffix .**, i.e. org.acme.**, matches a package that starts with the value
      If any element value matches a discovered type then the type is excluded from discovery, i.e. no beans and observer methods are created from this type.
    • unremovableTypes

      @ConfigItem public Optional<List<String>> unremovableTypes
      List of types that should be considered unremovable regardless of whether they are directly used or not. This is a configuration option equivalent to using Unremovable annotation.

      An element value can be:

      • a fully qualified class name, i.e. org.acme.Foo
      • a simple class name as defined by Class.getSimpleName(), i.e. Foo
      • a package name with suffix .*, i.e. org.acme.*, matches a package
      • a package name with suffix .**, i.e. org.acme.**, matches a package that starts with the value
      If any element value matches a discovered bean, then such a bean is considered unremovable.
    • excludeDependency

      @ConfigItem @ConfigDocSection @ConfigDocMapKey("dependency-name") Map<String,IndexDependencyConfig> excludeDependency
      Artifacts that should be excluded from discovery.

      These artifacts would be otherwise scanned for beans, i.e. they contain a Jandex index or a beans.xml descriptor.

    • detectUnusedFalsePositives

      @ConfigItem(defaultValue="true") public boolean detectUnusedFalsePositives
      If set to true then the container attempts to detect "unused removed beans" false positives during programmatic lookup at runtime. You can disable this feature to conserve some memory when running your application in production.
      See Also:
    • detectWrongAnnotations

      @ConfigItem(defaultValue="true") public boolean detectWrongAnnotations
      If set to true then the container attempts to detect wrong usages of annotations and eventually fails the build to prevent unexpected behavior of a Quarkus application.

      A typical example is @jakarta.ejb.Singleton which is often confused with @jakarta.inject.Singleton. As a result a component annotated with @jakarta.ejb.Singleton would be completely ignored. Another example is an inner class annotated with a scope annotation - this component would be again completely ignored.

    • strictCompatibility

      @ConfigItem(defaultValue="false") public boolean strictCompatibility
      If set to true, the container will perform additional validations mandated by the CDI specification. Some improvements on top of the CDI specification may be disabled. Applications that work as expected in the strict mode should work without a change in the default, non-strict mode.

      The strict mode is mainly introduced to allow passing the CDI Lite TCK. Applications are recommended to use the default, non-strict mode, which makes CDI more convenient to use. The "strictness" of the strict mode (the set of additional validations and the set of disabled improvements on top of the CDI specification) may change over time.

      Note that transformUnproxyableClasses and removeUnusedBeans also has effect on specification compatibility. You may want to disable these features to get behavior closer to the specification.

    • devMode

      @ConfigItem public ArcDevModeConfig devMode
      Dev mode configuration.
    • test

      @ConfigItem public ArcTestConfig test
      Test mode configuration.
    • ignoredSplitPackages

      @ConfigItem public Optional<List<String>> ignoredSplitPackages
      The list of packages that will not be checked for split package issues.

      A package string representation can be:

      • a full name of the package, i.e. org.acme.foo
      • a package name with suffix .*, i.e. org.acme.*, which matches a package that starts with provided value
    • contextPropagation

      @ConfigItem public ArcContextPropagationConfig contextPropagation
      Context propagation configuration.
    • optimizeContexts

      @ConfigItem(defaultValue="auto", generateDocumentation=false) public ArcConfig.OptimizeContexts optimizeContexts
      If set to true, the container should try to optimize the contexts for some of the scopes. If set to auto then optimize the contexts if there's less than 1000 beans in the application. If set to false do not optimize the contexts.

      Typically, some implementation parts of the context for ApplicationScoped could be pregenerated during build.

  • Constructor Details

    • ArcConfig

      public ArcConfig()
  • Method Details

    • isRemoveUnusedBeansFieldValid

      public final boolean isRemoveUnusedBeansFieldValid()
    • shouldEnableBeanRemoval

      public final boolean shouldEnableBeanRemoval()
    • shouldOnlyKeepAppBeans

      public final boolean shouldOnlyKeepAppBeans()