private static boolean isRoutableMethod(@Nonnull Method m) { for (Annotation a : m.getDeclaredAnnotations()) { if (WebMethodConstants.WEB_METHOD_ANNOTATION_NAMES.contains(a.annotationType().getName())) { return true; } if (a.annotationType().isAnnotationPresent(InterceptorAnnotation.class)) { // This is a Stapler interceptor annotation like RequirePOST or JsonResponse return true; } } for (Annotation[] set : m.getParameterAnnotations()) { for (Annotation a : set) { if (WebMethodConstants.WEB_METHOD_PARAMETER_ANNOTATION_NAMES.contains(a.annotationType().getName())) { return true; } } } for (Class<?> parameterType : m.getParameterTypes()) { if (WebMethodConstants.WEB_METHOD_PARAMETERS_NAMES.contains(parameterType.getName())) { return true; } } return WebApp.getCurrent().getFilterForDoActions().keep(new Function.InstanceFunction(m)); }
private void registerDoToken(KlassDescriptor<?> node){ final FunctionList filteredFunctions; FunctionList functions; if(LEGACY_WEB_METHOD_MODE || webApp.getFilterForDoActions() == null){ functions = node.methods.webMethodsLegacy(); filteredFunctions = functions; } else { functions = node.methods.webMethodsLegacy(); filteredFunctions = functions.filter(webApp.getFilterForDoActions()); if(LOGGER.isLoggable(Level.FINER)){ List<Function> excludedByNew = minus(functions, filteredFunctions);