public < T > T unwrap ( final Class < ? extends T > clazz ) throws ApplicationEngineException { checkNotNull ( clazz , "Target class cannot be null" ) ; if ( ! clazz . isInstance ( this ) ) { throw new ApplicationEngineException ( "Application Engine implementation is not compatible with " + clazz . getCanonicalName ( ) ) ; } return clazz . cast ( this ) ; }
Return an object of the specified type to allow access to the provider - specific API . If the provider s ApplicationEngine implementation does not support the specified class the ApplicationEngineException is thrown .