Class ArcConfig


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

      • 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:
        UnremovableBeanBuildItem
      • 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.
        • failOnInterceptedPrivateMethod

          @ConfigItem(defaultValue="false")
          public boolean failOnInterceptedPrivateMethod
          If set to true, 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 or AlternativePriority is overridden.
        • autoProducerMethods

          @ConfigItem(defaultValue="true")
          public boolean autoProducerMethods
          If set to true then javax.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:
          removeUnusedBeans
        • 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 @javax.ejb.Singleton which is often confused with @javax.inject.Singleton. As a result a component annotated with @javax.ejb.Singleton would be completely ignored. Another example is an inner class annotated with a scope annotation - this component would be again completely ignored.

        • 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
    • Constructor Detail

      • ArcConfig

        public ArcConfig()
    • Method Detail

      • isRemoveUnusedBeansFieldValid

        public final boolean isRemoveUnusedBeansFieldValid()
      • shouldEnableBeanRemoval

        public final boolean shouldEnableBeanRemoval()
      • shouldOnlyKeepAppBeans

        public final boolean shouldOnlyKeepAppBeans()