Class BeanProcessor.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • 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(IndexView)
      • 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:
        setComputingBeanArchiveIndex(IndexView)
      • 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
      • setApplicationClassPredicate

        public BeanProcessor.Builder setApplicationClassPredicate​(Predicate<org.jboss.jandex.DotName> applicationClassPredicate)
      • 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
        Parameters:
        removeUnusedBeans -
        Returns:
        self
      • 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.

      • 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