private static Object injectAndPostConstruct ( Object injectionProvider , Class Klass , List injectedBeanStorage ) { Object instance = null ; if ( injectionProvider != null ) { try { Object managedObject = _FactoryFinderProviderFactory . INJECTION_PROVIDER_INJECT_CLASS_METHOD . invoke ( injectionProvider , Klass ) ; instance = _FactoryFinderProviderFactory . MANAGED_OBJECT_GET_OBJECT_METHOD . invoke ( managedObject , null ) ; if ( instance != null ) { Object creationMetaData = _FactoryFinderProviderFactory . MANAGED_OBJECT_GET_CONTEXT_DATA_METHOD . invoke ( managedObject , CreationalContext . class ) ; addBeanEntry ( instance , creationMetaData , injectedBeanStorage ) ; _FactoryFinderProviderFactory . INJECTION_PROVIDER_POST_CONSTRUCT_METHOD . invoke ( injectionProvider , instance , creationMetaData ) ; } } catch ( Exception ex ) { throw new FacesException ( ex ) ; } } return instance ; }
injectANDPostConstruct based on a class added for CDI 1 . 2 support .