|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jersey.guice.spi.container.GuiceComponentProviderFactory
public class GuiceComponentProviderFactory
The Guice-based IoCComponentProviderFactory
.
Constructor Summary | |
---|---|
GuiceComponentProviderFactory(ResourceConfig config,
com.google.inject.Injector injector)
Creates a new GuiceComponentProviderFactory. |
Method Summary | |
---|---|
Map<com.google.inject.Scope,ComponentScope> |
createScopeMap()
Maps a Guice scope to a Jersey scope. |
IoCComponentProvider |
getComponentProvider(Class c)
Get the IoC component provider for a class. |
IoCComponentProvider |
getComponentProvider(ComponentContext cc,
Class clazz)
Get the IoC component provider for a class with additional context. |
boolean |
isGuiceConstructorInjected(Class<?> c)
Determine if a class is an implicit Guice component that can be instatiated by Guice and the life-cycle managed by Jersey. |
boolean |
isGuiceFieldOrMethodInjected(Class<?> c)
Determine if a class uses field or method injection via Guice using the Inject annotation |
boolean |
isImplicitGuiceComponent(Class<?> c)
Deprecated. see isGuiceConstructorInjected(java.lang.Class) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GuiceComponentProviderFactory(ResourceConfig config, com.google.inject.Injector injector)
config
- the resource configurationinjector
- the Guice injectorMethod Detail |
---|
public IoCComponentProvider getComponentProvider(Class c)
IoCComponentProviderFactory
getComponentProvider
in interface ComponentProviderFactory<IoCComponentProvider>
getComponentProvider
in interface IoCComponentProviderFactory
c
- the class
public IoCComponentProvider getComponentProvider(ComponentContext cc, Class clazz)
IoCComponentProviderFactory
The additional context will be associated with the annotations and
optionally an annotated object. For example, a component provider may
be requested for a class that is the type of a Field
, or be
requested for a class that is the type of a method parameter.
getComponentProvider
in interface IoCComponentProviderFactory
cc
- the component context to obtain annotations and
the annotated object (if present).clazz
- the class
@Deprecated public boolean isImplicitGuiceComponent(Class<?> c)
isGuiceConstructorInjected(java.lang.Class)
c
- the class.
public boolean isGuiceConstructorInjected(Class<?> c)
c
- the class.
public boolean isGuiceFieldOrMethodInjected(Class<?> c)
Inject
annotation
c
- the class.
public Map<com.google.inject.Scope,ComponentScope> createScopeMap()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |