Class SpringBeanLocator

java.lang.Object
org.apache.wicket.spring.SpringBeanLocator
All Implemented Interfaces:
Serializable, org.apache.wicket.proxy.IProxyTargetLocator, org.apache.wicket.util.io.IClusterable

public class SpringBeanLocator extends Object implements org.apache.wicket.proxy.IProxyTargetLocator
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 Details

  • Method Details

    • isSingletonBean

      public boolean isSingletonBean()
      Returns:
      returns whether the bean (the locator is supposed to istantiate) is a singleton or not
    • getBeanType

      public Class<?> getBeanType()
      Returns:
      bean class this locator is configured with
    • locateProxyTarget

      Specified by:
      locateProxyTarget in interface org.apache.wicket.proxy.IProxyTargetLocator
    • getBeanName

      public final String getBeanName()
      Returns:
      bean name this locator is configured with
    • getSpringContextLocator

      Returns:
      context locator this locator is configured with
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • 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.