Interface ArcConfig
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanIf set to true@Injectis automatically added to all non-static non-final fields that are annotated with one of the annotations defined byAutoInjectAnnotationBuildItem.booleanIf set to true thenjakarta.enterprise.inject.Producesis automatically added to all non-void methods that are annotated with a scope annotation, a stereotype or a qualifier, and are not annotated withInjectorProduces, and no parameter is annotated withDisposes,ObservesorObservesAsync.Context propagation configuration.booleanIf set to true then the container attempts to detect "unused removed beans" false positives during programmatic lookup at runtime.booleanIf 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.devMode()Dev mode configuration.Artifacts that should be excluded from discovery.The list of types that should be excluded from discovery.booleanIf 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.The list of packages that will not be checked for split package issues.default booleanIf set totrue, the container should try to optimize the contexts for some of the scopes.If set toall(ortrue) the container will attempt to remove all unused beans. If set tonone(orfalse) no beans will ever be removed even if they are unused (according to the criteria set out below) If set tofwk, then all unused beans will be removed, except the unused beans whose classes are declared in the application codeThe list of selected alternatives for an application.default booleandefault booleanbooleanIf set totrue, the container will perform additional validations mandated by the CDI specification.test()Test mode configuration.booleanIf set to true, the bytecode of private fields that are injection points will be transformed to package private.booleanIf set to true, the bytecode of unproxyable beans will be transformed.List of types that should be considered unremovable regardless of whether they are directly used or not.
-
Field Details
-
ALLOWED_REMOVE_UNUSED_BEANS_VALUES
-
-
Method Details
-
removeUnusedBeans
- If set to
all(ortrue) the container will attempt to remove all unused beans. - If set to
none(orfalse) 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
Instanceinjection point
- See Also:
- If set to
-
autoInjectFields
@WithDefault("true") boolean autoInjectFields()If set to true@Injectis automatically added to all non-static non-final fields that are annotated with one of the annotations defined byAutoInjectAnnotationBuildItem. -
transformUnproxyableClasses
@WithDefault("true") 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
@WithDefault("true") 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
@WithDefault("true") 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 ofTransactionalon a private method of a bean. If set to false, Quarkus simply logs a warning that the annotation will be ignored. -
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
Integer.MAX_VALUEis used for the relevant bean. The priority declared viaPriorityis overridden. - a fully qualified class name, i.e.
-
autoProducerMethods
@WithDefault("true") boolean autoProducerMethods()If set to true thenjakarta.enterprise.inject.Producesis automatically added to all non-void methods that are annotated with a scope annotation, a stereotype or a qualifier, and are not annotated withInjectorProduces, and no parameter is annotated withDisposes,ObservesorObservesAsync. -
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
- a fully qualified class name, i.e.
-
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 usingUnremovableannotation.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
- a fully qualified class name, i.e.
-
excludeDependency
@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
@WithDefault("true") 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
@WithDefault("true") 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.Singletonwhich is often confused with@jakarta.inject.Singleton. As a result a component annotated with@jakarta.ejb.Singletonwould be completely ignored. Another example is an inner class annotated with a scope annotation - this component would be again completely ignored. -
strictCompatibility
@WithDefault("false") boolean strictCompatibility()If set totrue, 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()andremoveUnusedBeans()also has effect on specification compatibility. You may want to disable these features to get behavior closer to the specification. -
devMode
ArcDevModeConfig devMode()Dev mode configuration. -
test
ArcTestConfig test()Test mode configuration. -
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
- a full name of the package, i.e.
-
contextPropagation
ArcContextPropagationConfig contextPropagation()Context propagation configuration. -
optimizeContexts
If set totrue, the container should try to optimize the contexts for some of the scopes. If set toautothen optimize the contexts if there's less than 1000 beans in the application. If set tofalsedo not optimize the contexts.Typically, some implementation parts of the context for
ApplicationScopedcould be pregenerated during build. -
isRemoveUnusedBeansFieldValid
default boolean isRemoveUnusedBeansFieldValid() -
shouldEnableBeanRemoval
default boolean shouldEnableBeanRemoval() -
shouldOnlyKeepAppBeans
default boolean shouldOnlyKeepAppBeans()
-