Package org.springframework.aop.target

Examples of org.springframework.aop.target.SingletonTargetSource


  protected TargetSource createTargetSource(Object target) {
    if (target instanceof TargetSource) {
      return (TargetSource) target;
    }
    else {
      return new SingletonTargetSource(target);
    }
  }
View Full Code Here


    TargetSource targetSource = null;

    if (targetObject instanceof TargetSource) {
      targetSource = (TargetSource) targetObject;
    } else {
      targetSource = new SingletonTargetSource(targetObject);
    }

    return targetSource;
  }
View Full Code Here

   * Will create a SingletonTargetSource for the object.
   * @see #setTargetSource
   * @see org.springframework.aop.target.SingletonTargetSource
   */
  public void setTarget(Object target) {
    setTargetSource(new SingletonTargetSource(target));
  }
View Full Code Here

      }
      if (logger.isDebugEnabled()) {
        logger.debug("Refreshing target with name '" + this.targetName + "'");
      }
      Object target = this.beanFactory.getBean(this.targetName);
      return (target instanceof TargetSource ? (TargetSource) target : new SingletonTargetSource(target));
    }
  }
View Full Code Here

  protected TargetSource createTargetSource(Object target) {
    if (target instanceof TargetSource) {
      return (TargetSource) target;
    }
    else {
      return new SingletonTargetSource(target);
    }
  }
View Full Code Here

    // Create proxy if we have advice.
    Object[] specificInterceptors = getAdvicesAndAdvisorsForBean(bean.getClass(), beanName, null);
    if (specificInterceptors != DO_NOT_PROXY) {
      this.advisedBeans.add(cacheKey);
      Object proxy = createProxy(bean.getClass(), beanName, specificInterceptors, new SingletonTargetSource(bean));
      this.proxyTypes.put(cacheKey, proxy.getClass());
      return proxy;
    }

    this.nonAdvisedBeans.add(cacheKey);
View Full Code Here

  protected TargetSource createTargetSource(Object target) {
    if (target instanceof TargetSource) {
      return (TargetSource) target;
    }
    else {
      return new SingletonTargetSource(target);
    }
  }
View Full Code Here

      }
      if (logger.isDebugEnabled()) {
        logger.debug("Refreshing target with name '" + this.targetName + "'");
      }
      Object target = this.beanFactory.getBean(this.targetName);
      return (target instanceof TargetSource ? (TargetSource) target : new SingletonTargetSource(target));
    }
  }
View Full Code Here

  protected TargetSource createTargetSource(Object target) {
    if (target instanceof TargetSource) {
      return (TargetSource) target;
    }
    else {
      return new SingletonTargetSource(target);
    }
  }
View Full Code Here

    // Create proxy if we have advice.
    Object[] specificInterceptors = getAdvicesAndAdvisorsForBean(bean.getClass(), beanName, null);
    if (specificInterceptors != DO_NOT_PROXY) {
      this.advisedBeans.put(cacheKey, Boolean.TRUE);
      Object proxy = createProxy(bean.getClass(), beanName, specificInterceptors, new SingletonTargetSource(bean));
      this.proxyTypes.put(cacheKey, proxy.getClass());
      return proxy;
    }

    this.advisedBeans.put(cacheKey, Boolean.FALSE);
View Full Code Here

TOP

Related Classes of org.springframework.aop.target.SingletonTargetSource

Copyright © 2018 www.massapicom. 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.