Package org.springframework.beans.factory

Examples of org.springframework.beans.factory.FactoryBeanNotInitializedException


  }


  public Object getObject() throws BeansException {
    if (this.beanFactory == null) {
      throw new FactoryBeanNotInitializedException();
    }
    return this.beanFactory.getBean(this.targetBeanName);
  }
View Full Code Here


    return this.beanFactory.getType(this.targetBeanName);
  }

  public boolean isSingleton() {
    if (this.beanFactory == null) {
      throw new FactoryBeanNotInitializedException();
    }
    return this.beanFactory.isSingleton(this.targetBeanName);
  }
View Full Code Here

    return this.beanFactory.isSingleton(this.targetBeanName);
  }

  public boolean isPrototype() {
    if (this.beanFactory == null) {
      throw new FactoryBeanNotInitializedException();
    }
    return this.beanFactory.isPrototype(this.targetBeanName);
  }
View Full Code Here

    public FlowConstruct getObject() throws Exception
    {
        if (flowConstruct == null)
        {
            throw new FactoryBeanNotInitializedException();
        }
        return flowConstruct;
    }
View Full Code Here

   */
  @SuppressWarnings("unchecked")
  private T getEarlySingletonInstance() throws Exception {
    Class<?>[] ifcs = getEarlySingletonInterfaces();
    if (ifcs == null) {
      throw new FactoryBeanNotInitializedException(
          getClass().getName() + " does not support circular references");
    }
    if (this.earlySingletonInstance == null) {
      this.earlySingletonInstance = (T) Proxy.newProxyInstance(
          this.beanClassLoader, ifcs, new EarlySingletonInvocationHandler());
View Full Code Here


  @Override
  public Object getObject() throws IllegalAccessException {
    if (this.fieldObject == null) {
      throw new FactoryBeanNotInitializedException();
    }
    ReflectionUtils.makeAccessible(this.fieldObject);
    if (this.targetObject != null) {
      // instance field
      return this.fieldObject.get(this.targetObject);
View Full Code Here

   */
  @Override
  public Object getObject() throws Exception {
    if (this.singleton) {
      if (!this.initialized) {
        throw new FactoryBeanNotInitializedException();
      }
      // Singleton: return shared object.
      return this.singletonObject;
    }
    else {
View Full Code Here

      this.targetSource = freshTargetSource();
      if (this.autodetectInterfaces && getProxiedInterfaces().length == 0 && !isProxyTargetClass()) {
        // Rely on AOP infrastructure to tell us what interfaces to proxy.
        Class<?> targetClass = getTargetClass();
        if (targetClass == null) {
          throw new FactoryBeanNotInitializedException("Cannot determine target class for proxy");
        }
        setInterfaces(ClassUtils.getAllInterfacesForClass(targetClass, this.proxyClassLoader));
      }
      // Initialize the shared singleton instance.
      super.setFrozen(this.freezeProxy);
View Full Code Here


  @Override
  public Object getObject() {
    if (this.proxy == null) {
      throw new FactoryBeanNotInitializedException();
    }
    return this.proxy;
  }
View Full Code Here

  }

  // Inherited.
  public Object getObject() throws Exception {
    if (!initialized) {
      throw new FactoryBeanNotInitializedException();
    }
   
    return wrapEndpoint(this.serviceInterface, this.serviceImplementationBean);
  }
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.FactoryBeanNotInitializedException

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.