public < T > T lookup ( String name , Class < T > expectedType ) throws Throwable { if ( name == null ) throw new IllegalArgumentException ( "Name is null" ) ; if ( expectedType == null ) throw new IllegalArgumentException ( "ExpectedType is null" ) ; if ( ! started ) throw new IllegalStateException ( "Container not started" ) ; return kernel . getBean ( name , expectedType ) ; }
Lookup a bean