com.sun.jersey.spi.inject
Interface InjectableProviderContext

All Known Implementing Classes:
InjectableProviderFactory

public interface InjectableProviderContext

The context to obtain Injectable instances.

Author:
[email protected]

Nested Class Summary
static class InjectableProviderContext.InjectableScopePair
           
 
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, ComponentScope 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<ComponentScope> ls)
          Get an injectable.
<A extends java.lang.annotation.Annotation,C>
InjectableProviderContext.InjectableScopePair
getInjectableWithScope(java.lang.Class<? extends java.lang.annotation.Annotation> ac, ComponentContext ic, A a, C c, java.util.List<ComponentScope> ls)
          Get an injectable.
 boolean isAnnotationRegistered(java.lang.Class<? extends java.lang.annotation.Annotation> ac, java.lang.Class<?> cc)
          Check if an annotation and context type is registered for injection.
 boolean isInjectableProviderRegistered(java.lang.Class<? extends java.lang.annotation.Annotation> ac, java.lang.Class<?> cc, ComponentScope s)
           
 

Method Detail

isAnnotationRegistered

boolean isAnnotationRegistered(java.lang.Class<? extends java.lang.annotation.Annotation> ac,
                               java.lang.Class<?> cc)
Check if an annotation and context type is registered for injection.

Parameters:
ac - the annotation class.
cc - the context type.
Returns:
true if registered, otherwise false

isInjectableProviderRegistered

boolean isInjectableProviderRegistered(java.lang.Class<? extends java.lang.annotation.Annotation> ac,
                                       java.lang.Class<?> cc,
                                       ComponentScope s)

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,
                                                                       ComponentScope s)
Get an injectable.

Type Parameters:
A - the type of the annotation.
C - 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<ComponentScope> ls)
Get an injectable.

Type Parameters:
A - the type of the annotation.
C - 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.
ls - the list of scope, ordered by preference.
Returns:
the injectable, otherwise null if an injectable could not be found.

getInjectableWithScope

<A extends java.lang.annotation.Annotation,C> InjectableProviderContext.InjectableScopePair getInjectableWithScope(java.lang.Class<? extends java.lang.annotation.Annotation> ac,
                                                                                                                   ComponentContext ic,
                                                                                                                   A a,
                                                                                                                   C c,
                                                                                                                   java.util.List<ComponentScope> ls)
Get an injectable.

Type Parameters:
A - the type of the annotation.
C - 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.
ls - the list of scope, ordered by preference.
Returns:
the injectable and scope, otherwise null if an injectable could not be found.


Copyright © 2011 Oracle Corporation. All Rights Reserved.