java.lang.Object
org.apache.wicket.spring.SpringBeanLocator
- All Implemented Interfaces:
Serializable
,IProxyTargetLocator
,IClusterable
Implementation of
IProxyTargetLocator
that can locate beans within a spring application
context. Beans are looked up by the combination of name and type, if name is omitted only type is
used.- Author:
- Igor Vaynberg (ivaynberg), Istvan Devai, Tobias Soloschenko
- See Also:
-
Constructor Summary
ConstructorDescriptionSpringBeanLocator
(Class<?> beanType, Field beanField, ISpringContextLocator locator) ConstructorSpringBeanLocator
(Class<?> beanType, ISpringContextLocator locator) ConstructorSpringBeanLocator
(String beanName, Class<?> beanType, Field beanField, ISpringContextLocator locator) ConstructorSpringBeanLocator
(String beanName, Class<?> beanType, ISpringContextLocator locator) -
Method Summary
Modifier and TypeMethodDescriptionboolean
org.springframework.beans.factory.support.RootBeanDefinition
getBeanDefinition
(org.springframework.context.ApplicationContext ctx, String name) Gets the root bean definition for the given name.final String
Class<?>
final ISpringContextLocator
int
hashCode()
boolean
Returns the object that will be used as target object for a lazy init proxy.
-
Constructor Details
-
SpringBeanLocator
Constructor- Parameters:
beanType
- bean classlocator
- spring context locator
-
SpringBeanLocator
-
SpringBeanLocator
Constructor- Parameters:
beanType
- bean classlocator
- spring context locator
-
SpringBeanLocator
public SpringBeanLocator(String beanName, Class<?> beanType, Field beanField, ISpringContextLocator locator) Constructor- Parameters:
beanName
- bean namebeanType
- bean classlocator
- spring context locator
-
-
Method Details
-
isSingletonBean
- Returns:
- returns whether the bean (the locator is supposed to istantiate) is a singleton or not
-
getBeanType
- Returns:
- bean class this locator is configured with
-
locateProxyTarget
Description copied from interface:IProxyTargetLocator
Returns the object that will be used as target object for a lazy init proxy.- Specified by:
locateProxyTarget
in interfaceIProxyTargetLocator
- Returns:
- retrieved object
-
getBeanName
- Returns:
- bean name this locator is configured with
-
getSpringContextLocator
- Returns:
- context locator this locator is configured with
-
equals
-
hashCode
-
getBeanDefinition
public org.springframework.beans.factory.support.RootBeanDefinition getBeanDefinition(org.springframework.context.ApplicationContext ctx, String name) Gets the root bean definition for the given name.- Parameters:
ctx
- spring application context.name
- bean name- Returns:
- bean definition for the current name, null if such a definition is not found.
-