com.sun.jersey.spi.inject
Class PerRequestTypeInjectableProvider<A extends Annotation,T>

java.lang.Object
  extended by com.sun.jersey.spi.inject.PerRequestTypeInjectableProvider<A,T>
Type Parameters:
A - the annotation type
T - the type returned by Injectable.getValue()
All Implemented Interfaces:
InjectableProvider<A,Type>

public abstract class PerRequestTypeInjectableProvider<A extends Annotation,T>
extends Object
implements InjectableProvider<A,Type>

A utility class that may implemented to support a per-request injectable provider for a specific type T.

Author:
Paul.Sandoz@Sun.Com

Constructor Summary
PerRequestTypeInjectableProvider(Type t)
          Construct a new instance with the Type
 
Method Summary
abstract  Injectable<T> getInjectable(ComponentContext ic, A a)
          Get an injectable for type T.
 Injectable getInjectable(ComponentContext ic, A a, Type c)
          Get an injectable.
 ComponentScope getScope()
          Get the scope of the injectable provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerRequestTypeInjectableProvider

public PerRequestTypeInjectableProvider(Type t)
Construct a new instance with the Type

Parameters:
t - the type of T.
Method Detail

getScope

public final ComponentScope getScope()
Description copied from interface: InjectableProvider
Get the scope of the injectable provider.

Specified by:
getScope in interface InjectableProvider<A extends Annotation,Type>
Returns:
the scope.

getInjectable

public final Injectable getInjectable(ComponentContext ic,
                                      A a,
                                      Type c)
Description copied from interface: InjectableProvider
Get an injectable.

Specified by:
getInjectable in interface InjectableProvider<A extends Annotation,Type>
Parameters:
ic - the injectable context
a - the annotation instance
c - the context instance
Returns:
an Injectable instance, otherwise null if an instance cannot be created.

getInjectable

public abstract Injectable<T> getInjectable(ComponentContext ic,
                                            A a)
Get an injectable for type T.

Parameters:
ic - the injectable context
a - the annotation instance
Returns:
an Injectable instance, otherwise null if an instance cannot be created.


Copyright © 2011 Oracle Corporation. All Rights Reserved.