IT. Expert System.

Java Enterprise Edition (EE)

Producer


javax.enterprise.inject.spi
Interface Producer<T>

Type Parameters:
T - The class of object produced by the producer
All Known Subinterfaces:
InjectionTarget<T>
public interface Producer<T>

Provides a generic operation for producing an instance of a type.

Author:
Pete Muir, David Allen

Method Summary
 void dispose(T instance)
           Destroys the instance.
 java.util.Set<InjectionPoint> getInjectionPoints()
           Returns the set of all InjectionPoints.
 T produce(CreationalContext<T> ctx)
           Causes an instance to be produced via the Producer.
 

Method Detail

produce

T produce(CreationalContext<T> ctx)

Causes an instance to be produced via the Producer.

If the Producer represents a class, this will invoke the constructor annotated Inject if it exists, or the constructor with no parameters otherwise. If the class has interceptors, produce() is responsible for building the interceptors and decorators of the instance.

If the Producer represents a producer field or method, this will invoke the producer method on, or access the producer field of, a contextual instance of the bean that declares the producer.

Parameters:
ctx - The CreationalContext to use for the produced object
Returns:
the instance produced

dispose

void dispose(T instance)

Destroys the instance.

If the Producer represents a class, then this operation does nothing.

If the Producer represents a producer field or method, this calls the disposer method, if any, on a contextual instance of the bean that declares the disposer method or performs any additional required cleanup, if any, to destroy state associated with a resource.

Parameters:
instance - The instance to dispose

getInjectionPoints

java.util.Set<InjectionPoint> getInjectionPoints()

Returns the set of all InjectionPoints. If the Producer represents a class, then this returns returns the set of InjectionPoint objects representing all injected fields, bean constructor parameters and initializer method parameters. For a producer method, this returns the set of InjectionPoint objects representing all parameters of the producer method.

Returns:
the set of all injection points for the producer


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: 2647 / . Delta: 0.01762 с