Class AutoAddScopeBuildItem.Builder

    • Method Detail

      • requiresContainerServices

        public AutoAddScopeBuildItem.Builder requiresContainerServices()
        At least one injection point or lifecycle callback must be declared in the class hierarchy. Otherwise, the scope annotation is not added.

        Note that the detection algorithm is just the best effort. Some inheritance rules defined by the spec are not followed, e.g. per spec an initializer method is only inherited if not overridden. This method merely scans the annotations.

        Returns:
        self
      • isAnnotatedWith

        public AutoAddScopeBuildItem.Builder isAnnotatedWith​(org.jboss.jandex.DotName annotationName)
        The class must be annotated with the given annotation. Otherwise, the scope annotation is not added.

        The final predicate is a short-circuiting logical AND of the previous predicate (if any) and this condition.

        Parameters:
        annotationName -
        Returns:
        self
      • containsAnnotations

        public AutoAddScopeBuildItem.Builder containsAnnotations​(org.jboss.jandex.DotName... annotationNames)
        The class or any of its element must be annotated with the given annotation. Otherwise, the scope annotation is not added.

        The final predicate is a short-circuiting logical AND of the previous predicate (if any) and this condition.

        Parameters:
        annotationNames -
        Returns:
        self
      • anyMethodMatches

        public AutoAddScopeBuildItem.Builder anyMethodMatches​(Predicate<org.jboss.jandex.MethodInfo> predicate)
        The class declares a method that matches the given predicate.

        The final predicate is a short-circuiting logical AND of the previous predicate (if any) and this condition.

        Parameters:
        predicate -
        Returns:
        self
      • implementsInterface

        public AutoAddScopeBuildItem.Builder implementsInterface​(org.jboss.jandex.DotName interfaceName)
        The class must directly or indirectly implement the given interface.

        The final predicate is a short-circuiting logical AND of the previous predicate (if any) and this condition.

        Parameters:
        interfaceName -
        Returns:
        self
      • defaultScope

        public AutoAddScopeBuildItem.Builder defaultScope​(org.jboss.jandex.DotName scopeAnnotationName)
        The scope annotation added to the class.
        Parameters:
        scopeAnnotationName -
        Returns:
        self
      • reason

        public AutoAddScopeBuildItem.Builder reason​(String reason)
        Specify an optional reason description that is used in log messages.
        Parameters:
        reason -
        Returns:
        the reason why the scope annotation was added