private < T > T getReference ( final Bean < T > bean ) { T ret = ( T ) beanReferences . get ( bean ) ; if ( null != ret ) { return ret ; } ret = bean . create ( ) ; if ( null != ret ) { beanReferences . put ( bean , ret ) ; return ret ; } throw new RuntimeException ( "Can't create reference for bean [" + bean + "]" ) ; }
Gets reference of the specified bean and creational context .