public class SpringComponentProviderFactory extends Object implements IoCComponentProviderFactory
IoCComponentProviderFactory
.
Resource and provider classes can be registered Spring-based beans using XML-based registration or auto-wire-based registration.
Constructor and Description |
---|
SpringComponentProviderFactory(ResourceConfig rc,
org.springframework.context.ConfigurableApplicationContext springContext) |
Modifier and Type | Method and Description |
---|---|
IoCComponentProvider |
getComponentProvider(Class c)
Get the IoC component provider for a class.
|
IoCComponentProvider |
getComponentProvider(ComponentContext cc,
Class c)
Get the IoC component provider for a class with additional context.
|
public SpringComponentProviderFactory(ResourceConfig rc, org.springframework.context.ConfigurableApplicationContext springContext)
public IoCComponentProvider getComponentProvider(Class c)
IoCComponentProviderFactory
getComponentProvider
in interface ComponentProviderFactory<IoCComponentProvider>
getComponentProvider
in interface IoCComponentProviderFactory
c
- the classpublic IoCComponentProvider getComponentProvider(ComponentContext cc, Class c)
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).c
- the classCopyright © 2013 Oracle Corporation. All rights reserved.