Examples of containsBean()


Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.containsBean()

    assertEquals(DummyFactory.class, lbf.getType("&x1"));
    assertTrue("prototype not instantiated", !DummyFactory.wasPrototypeCreated());

    lbf.registerAlias("x1", "x2");
    assertTrue(lbf.containsBean("x2"));
    assertTrue(lbf.containsBean("&x2"));
    assertTrue(lbf.containsLocalBean("x2"));
    assertTrue(lbf.containsLocalBean("&x2"));
    assertFalse(lbf.isSingleton("x2"));
    assertTrue(lbf.isSingleton("&x2"));
    assertTrue(lbf.isPrototype("x2"));
View Full Code Here

Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.containsBean()

    TestBeanFactory.initialized = false;
    String[] beanNames = lbf.getBeanNamesForType(TestBean.class, true, false);
    assertEquals(1, beanNames.length);
    assertEquals("x1", beanNames[0]);
    assertFalse(lbf.containsSingleton("x1"));
    assertTrue(lbf.containsBean("x1"));
    assertFalse(lbf.containsBean("&x1"));
    assertTrue(lbf.isSingleton("x1"));
    assertFalse(lbf.isSingleton("&x1"));
    assertFalse(lbf.isPrototype("x1"));
    assertFalse(lbf.isPrototype("&x1"));
View Full Code Here

Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.containsBean()

    String[] beanNames = lbf.getBeanNamesForType(TestBean.class, true, false);
    assertEquals(1, beanNames.length);
    assertEquals("x1", beanNames[0]);
    assertFalse(lbf.containsSingleton("x1"));
    assertTrue(lbf.containsBean("x1"));
    assertFalse(lbf.containsBean("&x1"));
    assertTrue(lbf.isSingleton("x1"));
    assertFalse(lbf.isSingleton("&x1"));
    assertFalse(lbf.isPrototype("x1"));
    assertFalse(lbf.isPrototype("&x1"));
    assertTrue(lbf.isTypeMatch("x1", TestBean.class));
View Full Code Here

Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.containsBean()

    TestBeanFactory.initialized = false;
    String[] beanNames = lbf.getBeanNamesForType(TestBean.class, true, false);
    assertEquals(1, beanNames.length);
    assertEquals("x1", beanNames[0]);
    assertFalse(lbf.containsSingleton("x1"));
    assertTrue(lbf.containsBean("x1"));
    assertFalse(lbf.containsBean("&x1"));
    assertFalse(lbf.isSingleton("x1"));
    assertFalse(lbf.isSingleton("&x1"));
    assertTrue(lbf.isPrototype("x1"));
    assertFalse(lbf.isPrototype("&x1"));
View Full Code Here

Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.containsBean()

    String[] beanNames = lbf.getBeanNamesForType(TestBean.class, true, false);
    assertEquals(1, beanNames.length);
    assertEquals("x1", beanNames[0]);
    assertFalse(lbf.containsSingleton("x1"));
    assertTrue(lbf.containsBean("x1"));
    assertFalse(lbf.containsBean("&x1"));
    assertFalse(lbf.isSingleton("x1"));
    assertFalse(lbf.isSingleton("&x1"));
    assertTrue(lbf.isPrototype("x1"));
    assertFalse(lbf.isPrototype("&x1"));
    assertTrue(lbf.isTypeMatch("x1", TestBean.class));
View Full Code Here

Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.containsBean()

    TestBeanFactory.initialized = false;
    String[] beanNames = lbf.getBeanNamesForType(TestBean.class, true, false);
    assertEquals(1, beanNames.length);
    assertEquals("x1", beanNames[0]);
    assertFalse(lbf.containsSingleton("x1"));
    assertTrue(lbf.containsBean("x1"));
    assertFalse(lbf.containsBean("&x1"));
    assertTrue(lbf.isSingleton("x1"));
    assertFalse(lbf.isSingleton("&x1"));
    assertFalse(lbf.isPrototype("x1"));
    assertFalse(lbf.isPrototype("&x1"));
View Full Code Here

Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.containsBean()

    String[] beanNames = lbf.getBeanNamesForType(TestBean.class, true, false);
    assertEquals(1, beanNames.length);
    assertEquals("x1", beanNames[0]);
    assertFalse(lbf.containsSingleton("x1"));
    assertTrue(lbf.containsBean("x1"));
    assertFalse(lbf.containsBean("&x1"));
    assertTrue(lbf.isSingleton("x1"));
    assertFalse(lbf.isSingleton("&x1"));
    assertFalse(lbf.isPrototype("x1"));
    assertFalse(lbf.isPrototype("&x1"));
    assertTrue(lbf.isTypeMatch("x1", TestBean.class));
View Full Code Here

Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.containsBean()

    TestBeanFactory.initialized = false;
    String[] beanNames = lbf.getBeanNamesForType(TestBean.class, true, false);
    assertEquals(1, beanNames.length);
    assertEquals("x1", beanNames[0]);
    assertFalse(lbf.containsSingleton("x1"));
    assertTrue(lbf.containsBean("x1"));
    assertFalse(lbf.containsBean("&x1"));
    assertTrue(lbf.containsLocalBean("x1"));
    assertFalse(lbf.containsLocalBean("&x1"));
    assertFalse(lbf.isSingleton("x1"));
    assertFalse(lbf.isSingleton("&x1"));
View Full Code Here

Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.containsBean()

    String[] beanNames = lbf.getBeanNamesForType(TestBean.class, true, false);
    assertEquals(1, beanNames.length);
    assertEquals("x1", beanNames[0]);
    assertFalse(lbf.containsSingleton("x1"));
    assertTrue(lbf.containsBean("x1"));
    assertFalse(lbf.containsBean("&x1"));
    assertTrue(lbf.containsLocalBean("x1"));
    assertFalse(lbf.containsLocalBean("&x1"));
    assertFalse(lbf.isSingleton("x1"));
    assertFalse(lbf.isSingleton("&x1"));
    assertTrue(lbf.isPrototype("x1"));
View Full Code Here

Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.containsBean()

    assertEquals(TestBean.class, lbf.getType("x1"));
    assertEquals(null, lbf.getType("&x1"));
    assertFalse(TestBeanFactory.initialized);

    lbf.registerAlias("x1", "x2");
    assertTrue(lbf.containsBean("x2"));
    assertFalse(lbf.containsBean("&x2"));
    assertTrue(lbf.containsLocalBean("x2"));
    assertFalse(lbf.containsLocalBean("&x2"));
    assertFalse(lbf.isSingleton("x2"));
    assertFalse(lbf.isSingleton("&x2"));
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.