Top Description Methods
javax.enterprise.inject.spi

public Interface InjectionTarget<T>

extends Producer<T>
Type Parameters
<T>
The class of the instance
Imports
javax.enterprise.context.spi.CreationalContext

Provides operations for performing dependency injection and lifecycle callbacks on an instance of a type.

Authors
Pete Muir, David Allen
See Also
javax.annotation.PostConstruct, javax.annotation.PreDestroy

Method Summary

Modifier and TypeMethod and Description
public void
inject(T
The instance upon which to perform injection
instance
,
CreationalContext<T>
The javax.enterprise.context.spi.CreationalContext to use for creating new instances
ctx
)

Performs dependency injection upon the given object.

public void
postConstruct(T
The instance on which to invoke the javax.annotation.PostConstruct method
instance
)

Calls the javax.annotation.PostConstruct callback, if it exists, according to the semantics required by the Java EE platform specification.

public void
preDestroy(T
The instance on which to invoke the javax.annotation.PreDestroy method
instance
)

Calls the javax.annotation.PreDestroy callback, if it exists, according to the semantics required by the Java EE platform specification.

Inherited from javax.enterprise.inject.spi.Producer:
disposegetInjectionPointsproduce

Method Detail

injectback to summary
public void inject(T instance, CreationalContext<T> ctx)

Performs dependency injection upon the given object. Performs Java EE component environment injection, sets the value of all injected fields, and calls all initializer methods.

Parameters
instance:T

The instance upon which to perform injection

ctx:CreationalContext<T>

The javax.enterprise.context.spi.CreationalContext to use for creating new instances

postConstructback to summary
public void postConstruct(T instance)

Calls the javax.annotation.PostConstruct callback, if it exists, according to the semantics required by the Java EE platform specification.

Parameters
instance:T

The instance on which to invoke the javax.annotation.PostConstruct method

preDestroyback to summary
public void preDestroy(T instance)

Calls the javax.annotation.PreDestroy callback, if it exists, according to the semantics required by the Java EE platform specification.

Parameters
instance:T

The instance on which to invoke the javax.annotation.PreDestroy method