IT. Expert System.

Java Enterprise Edition (EE)

InjectionPoint


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.

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.

Author:
Gavin King, Pete Muir

Method Summary
 Annotated getAnnotated()
          Obtain an instance of AnnotatedField or AnnotatedParameter, depending upon whether the injection point is an injected field or a constructor/method parameter.
 Bean<?> getBean()
          Get the Bean object representing the bean that defines the injection point.
 java.lang.reflect.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.
 java.util.Set<java.lang.annotation.Annotation> getQualifiers()
          Get the required qualifiers of the injection point.
 java.lang.reflect.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.
 

Method Detail

getType

java.lang.reflect.Type getType()
Get the required type of injection point.

Returns:
the required type

getQualifiers

java.util.Set<java.lang.annotation.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

java.lang.reflect.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


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1587 / . Delta: 0.00824 с