private Object getHandler ( NativeFunction atmosFunction , Class < ? extends AbstractNativeFunctionHandler > handlerTypeClass ) { Object handler = null ; try { Constructor < ? > handlerConst = handlerTypeClass . getConstructor ( NativeFunction . class , Global . class ) ; handler = handlerConst . newInstance ( atmosFunction , global ) ; } catch ( Exception e ) { // TODO Auto-generated catch block e . printStackTrace ( ) ; } return handler ; }
Convert Javascript function to Spring handler and return it .