public < R > R createAndInitialize ( StageLibraryTask stageLib , Configuration configuration , String stageLibraryName , Class < R > exportedInterface ) { StageLibraryDelegate instance = create ( stageLib , stageLibraryName , exportedInterface ) ; if ( instance == null ) { return null ; } // Create & set context StageLibraryDelegateContext context = new StageLibraryDelegateContext ( configuration ) ; instance . setContext ( context ) ; return ( R ) new StageLibraryDelegateRuntime ( instance . getClass ( ) . getClassLoader ( ) , instance ) ; }
Create and initialize new delegate .