com.sun.jersey.spi.inject
Interface InjectableProviderContext


public interface InjectableProviderContext

The context to obtain Injectable instances.

Author:
Paul.Sandoz@Sun.Com

Method Summary
<A extends java.lang.annotation.Annotation,C>
Injectable
getInjectable(java.lang.Class<? extends java.lang.annotation.Annotation> ac, ComponentContext ic, A a, C c, ComponentProvider.Scope s)
          Get an injectable.
<A extends java.lang.annotation.Annotation,C>
Injectable
getInjectable(java.lang.Class<? extends java.lang.annotation.Annotation> ac, ComponentContext ic, A a, C c, java.util.List<ComponentProvider.Scope> s)
          Get an injectable.
 java.util.List<Injectable> getInjectable(java.util.List<Parameter> ps, ComponentProvider.Scope s)
          Get a list of injectable given a list of parameter.
 Injectable getInjectable(Parameter p, ComponentProvider.Scope s)
          Get an injectable given a parameter.
 

Method Detail

getInjectable

<A extends java.lang.annotation.Annotation,C> Injectable getInjectable(java.lang.Class<? extends java.lang.annotation.Annotation> ac,
                                                                       ComponentContext ic,
                                                                       A a,
                                                                       C c,
                                                                       ComponentProvider.Scope s)
Get an injectable.

Type Parameters:
A - the type of the annotation.
C - the the context type. Types of the Type and Parameter are the only types that are supported.
Parameters:
ac - the annotation class.
ic - the injectable context.
a - the annotation instance.
c - the context type.
s - the scope.
Returns:
the injectable, otherwise null if an injectable could not be found.

getInjectable

<A extends java.lang.annotation.Annotation,C> Injectable getInjectable(java.lang.Class<? extends java.lang.annotation.Annotation> ac,
                                                                       ComponentContext ic,
                                                                       A a,
                                                                       C c,
                                                                       java.util.List<ComponentProvider.Scope> s)
Get an injectable.

Type Parameters:
A - the type of the annotation.
C - the the context type. Types of the Type and Parameter are the only types that are supported.
Parameters:
ac - the annotation class.
ic - the injectable context.
a - the annotation instance.
c - the context type.
s - the list of scope, ordered by preference.
Returns:
the injectable, otherwise null if an injectable could not be found.

getInjectable

Injectable getInjectable(Parameter p,
                         ComponentProvider.Scope s)
Get an injectable given a parameter.

Parameters:
p - the parameter.
s - the scope for which the injectable will be used
Returns:
the injectable, otherwise null if an injectable could not be found.

getInjectable

java.util.List<Injectable> getInjectable(java.util.List<Parameter> ps,
                                         ComponentProvider.Scope s)
Get a list of injectable given a list of parameter.

Parameters:
ps - the list of parameter.
s - the scope for which the injectable will be used
Returns:
the list of injectable, if an injectable for a parameter could not be found the corresponding element in the list will be null.


Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.