Code example for Method

Methods: getName, getParameterTypes

0
		Class<?>[] argTypes = method.getParameterTypes();
 
		switch (argTypes.length) {
		case 2: 
			if (!ClassUtils.isImplement(argTypes[1], Callback.class))
				return false; 
		case 1: 
			if (!ClassUtils.isImplement(argTypes[0], Params.class)
					&& !ClassUtils.isImplement(argTypes[0], Callback.class))
				return false; 
		case 0: 
			break; 
		default: 
			Log.w(TAG, "dest:" + method.getName() + " has illegal arguments");
			return false; 
		} 
 
		return true; 
	} 
 
	@SuppressLint("SetJavaScriptEnabled") 
	public void configureSetting(WebViewBridge webViewBridge) {
		WebSettings settings = webViewBridge.getSettings();
		settings.setJavaScriptEnabled(true);