com.sun.jersey.core.spi.factory
Class InjectableProviderFactory

java.lang.Object
  extended by com.sun.jersey.core.spi.factory.InjectableProviderFactory
All Implemented Interfaces:
InjectableProviderContext
Direct Known Subclasses:
ServerInjectableProviderFactory

public class InjectableProviderFactory
extends Object
implements InjectableProviderContext

A factory for managing InjectableProvider instances.

Author:
Paul.Sandoz@Sun.Com

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.sun.jersey.spi.inject.InjectableProviderContext
InjectableProviderContext.InjectableScopePair
 
Constructor Summary
InjectableProviderFactory()
           
 
Method Summary
 void add(InjectableProvider ip)
           
 void configure(ProviderServices providerServices)
           
 void configureProviders(ProviderServices providerServices)
           
<A extends Annotation,C>
Injectable
getInjectable(Class<? extends Annotation> ac, ComponentContext ic, A a, C c, ComponentScope s)
          Get an injectable.
<A extends Annotation,C>
Injectable
getInjectable(Class<? extends Annotation> ac, ComponentContext ic, A a, C c, List<ComponentScope> ls)
          Get an injectable.
<A extends Annotation,C>
InjectableProviderContext.InjectableScopePair
getInjectableWithScope(Class<? extends Annotation> ac, ComponentContext ic, A a, C c, List<ComponentScope> ls)
          Get an injectable.
 boolean isAnnotationRegistered(Class<? extends Annotation> ac, Class<?> cc)
          Check if an annotaton and context type is registered for injection.
 boolean isInjectableProviderRegistered(Class<? extends Annotation> ac, Class<?> cc, ComponentScope s)
           
 void update(InjectableProviderFactory ipf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InjectableProviderFactory

public InjectableProviderFactory()
Method Detail

update

public final void update(InjectableProviderFactory ipf)

add

public final void add(InjectableProvider ip)

configure

public final void configure(ProviderServices providerServices)

configureProviders

public final void configureProviders(ProviderServices providerServices)

isAnnotationRegistered

public boolean isAnnotationRegistered(Class<? extends Annotation> ac,
                                      Class<?> cc)
Description copied from interface: InjectableProviderContext
Check if an annotaton and context type is registered for injection.

Specified by:
isAnnotationRegistered in interface InjectableProviderContext
Parameters:
ac - the annotation class.
cc - the context type.
Returns:
true if reigstered, otherwise false

isInjectableProviderRegistered

public boolean isInjectableProviderRegistered(Class<? extends Annotation> ac,
                                              Class<?> cc,
                                              ComponentScope s)
Specified by:
isInjectableProviderRegistered in interface InjectableProviderContext

getInjectable

public final <A extends Annotation,C> Injectable getInjectable(Class<? extends Annotation> ac,
                                                               ComponentContext ic,
                                                               A a,
                                                               C c,
                                                               ComponentScope s)
Description copied from interface: InjectableProviderContext
Get an injectable.

Specified by:
getInjectable in interface InjectableProviderContext
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

public final <A extends Annotation,C> Injectable getInjectable(Class<? extends Annotation> ac,
                                                               ComponentContext ic,
                                                               A a,
                                                               C c,
                                                               List<ComponentScope> ls)
Description copied from interface: InjectableProviderContext
Get an injectable.

Specified by:
getInjectable in interface InjectableProviderContext
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

public <A extends Annotation,C> InjectableProviderContext.InjectableScopePair getInjectableWithScope(Class<? extends Annotation> ac,
                                                                                                     ComponentContext ic,
                                                                                                     A a,
                                                                                                     C c,
                                                                                                     List<ComponentScope> ls)
Description copied from interface: InjectableProviderContext
Get an injectable.

Specified by:
getInjectableWithScope in interface InjectableProviderContext
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 © 2013 Oracle Corporation. All Rights Reserved.