code: 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;
  	}
docs: Convert Javascript function to Spring handler and return it.
  
  @param atmosFunction
  Javascript function
  @param handlerTypeClass
  handler type to return
  @return