jodd-petite/src/main/java/jodd/petite/PetiteContainer.java
@SuppressWarnings({"unchecked"})
	public <E> E createBean(final Class<E> type, final WiringMode wiringMode) {
		final WiringMode finalWiringMode = petiteConfig.resolveWiringMode(wiringMode);

		final BeanDefinition def = externalsCache.get(
			type, () -> {
				final BeanDefinition beanDefinition = createBeandDefinitionForExternalBeans(type, finalWiringMode);
				initBeanDefinition(beanDefinition);
				return beanDefinition;
			});

		final BeanData<E> beanData = new BeanData(this, def);
		registerBeanAndWireAndInjectParamsAndInvokeInitMethods(beanData);
		return beanData.bean();
	}
@SuppressWarnings({"unchecked"})
	public <E> E createBean(final Class<E> type, final WiringMode wiringMode) {
		final WiringMode finalWiringMode = petiteConfig.resolveWiringMode(wiringMode);

		final BeanDefinition def = externalsCache.get(
			type, () -> {
				final BeanDefinition beanDefinition = createBeandDefinitionForExternalBeans(type, finalWiringMode);
				initBeanDefinition(beanDefinition);
				return beanDefinition;
			});

		final BeanData<E> beanData = new BeanData(this, def);
		registerBeanAndWireAndInjectParamsAndInvokeInitMethods(beanData);
		return beanData.bean();
	}
@ SuppressWarnings ( { "unchecked" } ) public < E > E createBean ( final Class < E > type , final WiringMode wiringMode ) { final WiringMode finalWiringMode = petiteConfig . resolveWiringMode ( wiringMode ) ; final BeanDefinition def = externalsCache . get ( type , ( ) -> { final BeanDefinition beanDefinition = createBeandDefinitionForExternalBeans ( type , finalWiringMode ) ; initBeanDefinition ( beanDefinition ) ; return beanDefinition ; } ) ; final BeanData < E > beanData = new BeanData ( this , def ) ; registerBeanAndWireAndInjectParamsAndInvokeInitMethods ( beanData ) ; return beanData . bean ( ) ; }
Creates and wires a bean within the container and optionally invokes init methods. However, bean is
<b>not</b> registered.
Creates and wires a bean within the container and optionally invokes init methods . However bean is <b > not< / b > registered .