javax.enterprise.inject.spi

Interface InjectionPoint


  • public interface InjectionPoint

    Provides access to metadata about an injection point. May represent an injected field or a parameter of a bean constructor, initializer method, producer method, disposer method or observer method.

    If the injection point is a dynamically selected reference obtained then the metadata obtain reflects the injection point of the Instance, with the required type and any additional required qualifers defined by Instance.select().

    Occasionally, a bean with scope @Dependent needs to access metadata relating to the object to which it belongs. The bean may inject an InjectionPoint representing the injection point into which the bean was injected.

    For example, the following producer method creates injectable Logger s. The log category of a Logger depends upon the class of the object into which it is injected.

     @Produces
     Logger createLogger(InjectionPoint injectionPoint) {
         return Logger.getLogger(injectionPoint.getMember().getDeclaringClass().getName());
     }
     

    Only dependent objects, may obtain information about the injection point to which they belong.

    Author:
    Gavin King, Pete Muir
    • Method Detail

      • getType

        Type getType()
        Get the required type of injection point.
        Returns:
        the required type
      • getQualifiers

        Set<Annotation> getQualifiers()
        Get the required qualifiers of the injection point.
        Returns:
        the required qualifiers
      • getBean

        Bean<?> getBean()
        Get the Bean object representing the bean that defines the injection point. If the injection point does not belong to a bean, return a null value.
        Returns:
        the Bean object representing bean that defines the injection point, of null if the injection point does not belong to a bean
      • getMember

        Member getMember()
        Get the Field object in the case of field injection, the Method object in the case of method parameter injection or the Constructor object in the case of constructor parameter injection.
        Returns:
        the member
      • getAnnotated

        Annotated getAnnotated()
        Obtain an instance of AnnotatedField or AnnotatedParameter, depending upon whether the injection point is an injected field or a constructor/method parameter.
        Returns:
        an AnnotatedField or AnnotatedParameter
      • isDelegate

        boolean isDelegate()
        Determines if the injection point is a decorator delegate injection point.
        Returns:
        true if the injection point is a decorator delegate injection point, and false otherwise
      • isTransient

        boolean isTransient()
        Determines if the injection is a transient field.
        Returns:
        true if the injection point is a transient field, and false otherwise

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 11/06/2005 gemaakt, de laatste keer de 18/08/2025 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-javaee-rf-javax/enterprise/inject/spi/injectionpoint.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : https://docs.oracle.com/en/java/, Interface InjectionPoint

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur van deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.