Class BeanProcessor.Builder

java.lang.Object
io.quarkus.arc.processor.BeanProcessor.Builder
Enclosing class:
BeanProcessor

public static class BeanProcessor.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • setName

      public BeanProcessor.Builder setName(String name)
    • setComputingBeanArchiveIndex

      public BeanProcessor.Builder setComputingBeanArchiveIndex(org.jboss.jandex.IndexView index)
      Set the computing bean archive index. This index is optional and can be used for example during type-safe resolution. If it's not set then the immutable index is used instead.

      The computing index must be built on top of the immutable index and compute only the classes that are not part of the immutable index.

      This index is never used to discover components (beans, observers, etc.).

      Parameters:
      index -
      Returns:
      self
      See Also:
    • setImmutableBeanArchiveIndex

      public BeanProcessor.Builder setImmutableBeanArchiveIndex(org.jboss.jandex.IndexView index)
      Set the immutable bean archive index. This index is mandatory and is used to discover components (beans, observers, etc.).
      Parameters:
      index -
      Returns:
      self
      See Also:
    • setApplicationIndex

      public BeanProcessor.Builder setApplicationIndex(org.jboss.jandex.IndexView index)
      Set the application index. This index is optional and is also used to discover types during type-safe resolution.

      Some types may not be part of the bean archive index but are still needed during type-safe resolution.

      Parameters:
      index -
      Returns:
      self
    • setAdditionalBeanDefiningAnnotations

      public BeanProcessor.Builder setAdditionalBeanDefiningAnnotations(Collection<BeanDefiningAnnotation> additionalBeanDefiningAnnotations)
    • addQualifierRegistrar

      public BeanProcessor.Builder addQualifierRegistrar(QualifierRegistrar qualifierRegistrar)
    • addInterceptorBindingRegistrar

      public BeanProcessor.Builder addInterceptorBindingRegistrar(InterceptorBindingRegistrar bindingRegistrar)
    • addStereotypeRegistrar

      public BeanProcessor.Builder addStereotypeRegistrar(StereotypeRegistrar stereotypeRegistrar)
    • setOutput

      public BeanProcessor.Builder setOutput(ResourceOutput output)
    • setReflectionRegistration

      public BeanProcessor.Builder setReflectionRegistration(ReflectionRegistration reflectionRegistration)
    • addAnnotationTransformer

      @Deprecated(forRemoval=true) public BeanProcessor.Builder addAnnotationTransformer(AnnotationsTransformer transformer)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • addAnnotationTransformation

      public BeanProcessor.Builder addAnnotationTransformation(org.jboss.jandex.AnnotationTransformation transformation)
    • addInjectionPointTransformer

      public BeanProcessor.Builder addInjectionPointTransformer(InjectionPointsTransformer transformer)
    • addObserverTransformer

      public BeanProcessor.Builder addObserverTransformer(ObserverTransformer transformer)
    • addResourceAnnotations

      public BeanProcessor.Builder addResourceAnnotations(Collection<org.jboss.jandex.DotName> resourceAnnotations)
    • addBeanRegistrar

      public BeanProcessor.Builder addBeanRegistrar(BeanRegistrar registrar)
    • addObserverRegistrar

      public BeanProcessor.Builder addObserverRegistrar(ObserverRegistrar registrar)
    • addContextRegistrar

      public BeanProcessor.Builder addContextRegistrar(ContextRegistrar registrar)
    • addBeanDeploymentValidator

      public BeanProcessor.Builder addBeanDeploymentValidator(BeanDeploymentValidator validator)
    • setApplicationClassPredicate

      public BeanProcessor.Builder setApplicationClassPredicate(Predicate<org.jboss.jandex.DotName> applicationClassPredicate)
    • setJtaCapabilities

      public BeanProcessor.Builder setJtaCapabilities(boolean jtaCapabilities)
    • setAllowMocking

      public void setAllowMocking(boolean allowMocking)
    • setRemoveUnusedBeans

      public BeanProcessor.Builder setRemoveUnusedBeans(boolean removeUnusedBeans)
      If set to true the container will attempt to remove all unused beans.

      An unused bean:

      • is not a built-in bean or interceptor,
      • is not eligible for injection to any injection point,
      • is not excluded - see addRemovalExclusion(Predicate),
      • 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,
      • is not a result of resolving an invoker lookup
      Parameters:
      removeUnusedBeans -
      Returns:
      self
    • addRemovalExclusion

      public BeanProcessor.Builder addRemovalExclusion(Predicate<BeanInfo> predicate)
      Exclude unused beans that match the given predicate from removal.
      Parameters:
      predicate -
      Returns:
      self
      See Also:
    • setTransformUnproxyableClasses

      public BeanProcessor.Builder setTransformUnproxyableClasses(boolean value)
      If set to true the container will transform unproxyable bean classes during validation.
      Parameters:
      value -
      Returns:
      self
    • setTransformPrivateInjectedFields

      public BeanProcessor.Builder setTransformPrivateInjectedFields(boolean value)
      If set to true the container will transform injected private field of class based beans during validation.
      Parameters:
      value -
      Returns:
      self
    • setFailOnInterceptedPrivateMethod

      public void setFailOnInterceptedPrivateMethod(boolean failOnInterceptedPrivateMethod)
      If set to true, the build will fail if an annotation that would result in an interceptor being created (such as @Transactional)
    • setGenerateSources

      public BeanProcessor.Builder setGenerateSources(boolean value)
      If set to true the will generate source files of all generated classes for debug purposes. The generated source is not actually a source file but a textual representation of generated code.
      Parameters:
      value -
      Returns:
      self
    • setStrictCompatibility

      public BeanProcessor.Builder setStrictCompatibility(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 setTransformUnproxyableClasses(boolean) also has effect on specification compatibility. Set it to false when unproxyable bean types should always lead to a deployment problem.

    • setOptimizeContexts

      public BeanProcessor.Builder setOptimizeContexts(boolean value)
      Parameters:
      value -
      Returns:
      self
    • setOptimizeContexts

      public BeanProcessor.Builder setOptimizeContexts(Predicate<BeanDeployment> fun)
      Parameters:
      fun -
      Returns:
      self
    • setAlternativePriorities

      public BeanProcessor.Builder setAlternativePriorities(AlternativePriorities priorities)
      Can be used to compute a priority of an alternative bean. A non-null computed value always takes precedence over the priority defined by Priority or a stereotype.
      Parameters:
      priorities -
      Returns:
      self
    • addExcludeType

      public BeanProcessor.Builder addExcludeType(Predicate<org.jboss.jandex.ClassInfo> predicate)
      Specify the types that should be excluded from discovery.
      Parameters:
      predicate -
      Returns:
      self
    • addSuppressConditionGenerator

      public BeanProcessor.Builder addSuppressConditionGenerator(Function<BeanInfo,Consumer<io.quarkus.gizmo.BytecodeCreator>> generator)
      A generator can contribute to the generated InjectableBean.isSuppressed() method body.
      Parameters:
      generator -
      Returns:
      self
    • setBuildCompatibleExtensions

      public BeanProcessor.Builder setBuildCompatibleExtensions(ExtensionsEntryPoint buildCompatibleExtensions)
    • build

      public BeanProcessor build()