Examples of SpringBeanLocator


Examples of org.apache.wicket.spring.SpringBeanLocator

   */
  public Object getFieldValue(Field field, Object fieldOwner) {

    if (field.isAnnotationPresent(SpringBean.class)) {
      SpringBean annot = field.getAnnotation(SpringBean.class);
      SpringBeanLocator locator = new SpringBeanLocator(annot.name(),
          field.getType(), contextLocator);

      // only check the cache if the bean is a singleton
      if (locator.isSingletonBean() && cache.containsKey(locator)) {
        return cache.get(locator);
      }

      if (failFast) {
        testLocator(locator, fieldOwner, field);
      }

      Object proxy = LazyInitProxyFactory.createProxy(field.getType(),
          locator);
      // only put the proxy into the cache if the bean is a singleton
      if (locator.isSingletonBean()) {
        cache.put(locator, proxy);
      }
      return proxy;
    } else {
      return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.