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.
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 Loggers. 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.
| Modifier and Type | Method and Description | 
|---|---|
| Annotated | getAnnotated()Obtain an instance of  AnnotatedFieldorAnnotatedParameter, depending upon 
 whether the injection point is an injected field or a constructor/method parameter. | 
| Bean<?> | getBean()Get the  Beanobject representing the 
 bean that defines the injection point. | 
| Member | getMember()Get the  Fieldobject in the case of field 
 injection, theMethodobject in
 the case of method parameter injection or theConstructorobject in the case of constructor 
 parameter injection. | 
| Set<Annotation> | getQualifiers()Get the required qualifiers of the injection point. | 
| Type | getType()Get the required type of injection point. | 
| boolean | isDelegate()Determines if the injection point is a decorator delegate injection point. | 
| boolean | isTransient()Determines if the injection is a transient field. | 
Type getType()
Set<Annotation> getQualifiers()
Bean<?> getBean()
Bean object representing the 
 bean that defines the injection point. If the injection point does not 
 belong to a bean, return a null value.Bean object representing 
         bean that defines the injection point, of null if the injection 
         point does not belong to a beanMember getMember()
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.Annotated getAnnotated()
AnnotatedField 
 or AnnotatedParameter, depending upon 
 whether the injection point is an injected field or a constructor/method parameter.AnnotatedField or AnnotatedParameterboolean isDelegate()
boolean isTransient()
Copyright © 2018 JBoss by Red Hat. All rights reserved.