/** * Helper method that registers the methods of the given bean. This method iterates over the methods of the bean, * and calls {@link #getActionForMethod(java.lang.reflect.Method)} for each. If this returns a URI, the method is * registered using {@link #registerEndpoint(java.net.URI, Object)}. * * @see #getActionForMethod (java.lang.reflect.Method) */ protected void registerMethods(Object endpoint) { Assert.notNull(endpoint, "'endpoint' must not be null"); Method[] methods = AopUtils.getTargetClass(endpoint).getMethods(); for (Method method : methods) { if (method.isSynthetic() || method.getDeclaringClass().equals(Object.class)) { continue; } URI action = getActionForMethod(method); if (action != null) { registerEndpoint(action, new MethodEndpoint(endpoint, method)); } } }
public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException { List<T> keys = getLookupKeysForMethod(method); for (T key : keys) { registerEndpoint(key, new MethodEndpoint(endpoint, method)); } } });
public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException { List<T> keys = getLookupKeysForMethod(method); for (T key : keys) { registerEndpoint(key, new MethodEndpoint(endpoint, method)); } } });
/** * Helper method that registers the methods of the given bean. This method iterates over the methods of the bean, * and calls {@link #getActionForMethod(java.lang.reflect.Method)} for each. If this returns a URI, the method is * registered using {@link #registerEndpoint(java.net.URI, Object)}. * * @see #getActionForMethod (java.lang.reflect.Method) */ protected void registerMethods(Object endpoint) { Assert.notNull(endpoint, "'endpoint' must not be null"); Method[] methods = AopUtils.getTargetClass(endpoint).getMethods(); for (Method method : methods) { if (method.isSynthetic() || method.getDeclaringClass().equals(Object.class)) { continue; } URI action = getActionForMethod(method); if (action != null) { registerEndpoint(action, new MethodEndpoint(endpoint, method)); } } }
public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException { T key = getLookupKeyForMethod(method); if (key != null) { registerEndpoint(key, new MethodEndpoint(endpoint, method)); } } });
public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException { List<T> keys = getLookupKeysForMethod(method); for (T key : keys) { registerEndpoint(key, new MethodEndpoint(endpoint, method)); } } });
/** * Helper method that registers the methods of the given bean. This method iterates over the methods of the bean, * and calls {@link #getActionForMethod(java.lang.reflect.Method)} for each. If this returns a URI, the method is * registered using {@link #registerEndpoint(java.net.URI, Object)}. * * @see #getActionForMethod (java.lang.reflect.Method) */ protected void registerMethods(Object endpoint) { Assert.notNull(endpoint, "'endpoint' must not be null"); Method[] methods = AopUtils.getTargetClass(endpoint).getMethods(); for (Method method : methods) { if (method.isSynthetic() || method.getDeclaringClass().equals(Object.class)) { continue; } URI action = getActionForMethod(method); if (action != null) { registerEndpoint(action, new MethodEndpoint(endpoint, method)); } } }
/** * Helper method that registers the methods of the given bean. This method iterates over the methods of the bean, * and calls {@link #getLookupKeyForMethod(Method)} for each. If this returns a string, the method is registered * using {@link #registerEndpoint(Object, MethodEndpoint)}. * * @see #getLookupKeyForMethod(Method) */ protected void registerMethods(final Object endpoint) { Assert.notNull(endpoint, "'endpoint' must not be null"); Class<?> endpointClass = getEndpointClass(endpoint); ReflectionUtils.doWithMethods(endpointClass, new ReflectionUtils.MethodCallback() { public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException { List<T> keys = getLookupKeysForMethod(method); for (T key : keys) { registerEndpoint(key, new MethodEndpoint(endpoint, method)); } } }); }
/** * Helper method that registers the methods of the given bean. This method iterates over the methods of the bean, * and calls {@link #getLookupKeyForMethod(Method)} for each. If this returns a string, the method is registered * using {@link #registerEndpoint(Object, MethodEndpoint)}. * * @see #getLookupKeyForMethod(Method) */ protected void registerMethods(final Object endpoint) { Assert.notNull(endpoint, "'endpoint' must not be null"); Class<?> endpointClass = getEndpointClass(endpoint); ReflectionUtils.doWithMethods(endpointClass, new ReflectionUtils.MethodCallback() { public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException { List<T> keys = getLookupKeysForMethod(method); for (T key : keys) { registerEndpoint(key, new MethodEndpoint(endpoint, method)); } } }); }
/** * Helper method that registers the methods of the given bean. This method iterates over the methods of the bean, * and calls {@link #getActionForMethod(java.lang.reflect.Method)} for each. If this returns a URI, the method is * registered using {@link #registerEndpoint(java.net.URI, Object)}. * * @see #getActionForMethod (java.lang.reflect.Method) */ protected void registerMethods(Object endpoint) { Assert.notNull(endpoint, "'endpoint' must not be null"); Method[] methods = AopUtils.getTargetClass(endpoint).getMethods(); for (Method method : methods) { if (method.isSynthetic() || method.getDeclaringClass().equals(Object.class)) { continue; } URI action = getActionForMethod(method); if (action != null) { registerEndpoint(action, new MethodEndpoint(endpoint, method)); } } }
/** * Helper method that registers the methods of the given bean. This method iterates over the methods of the bean, * and calls {@link #getLookupKeyForMethod(Method)} for each. If this returns a string, the method is registered * using {@link #registerEndpoint(Object, MethodEndpoint)}. * * @see #getLookupKeyForMethod(Method) */ protected void registerMethods(final Object endpoint) { Assert.notNull(endpoint, "'endpoint' must not be null"); Class<?> endpointClass = getEndpointClass(endpoint); ReflectionUtils.doWithMethods(endpointClass, new ReflectionUtils.MethodCallback() { public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException { List<T> keys = getLookupKeysForMethod(method); for (T key : keys) { registerEndpoint(key, new MethodEndpoint(endpoint, method)); } } }); }
public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException { T key = getLookupKeyForMethod(method); if (key != null) { registerEndpoint(key, new MethodEndpoint(beanName, getApplicationContext(), method)); } }
/** * Helper method that registers the methods of the given class. This method iterates over the methods of the class, * and calls {@link #getLookupKeyForMethod(Method)} for each. If this returns a string, the method is registered * using {@link #registerEndpoint(Object, MethodEndpoint)}. * * @see #getLookupKeyForMethod(Method) * @see #getLookupKeysForMethod(Method) */ protected void registerMethods(String beanName) { Assert.hasText(beanName, "'beanName' must not be empty"); Class<?> endpointType = getApplicationContext().getType(beanName); endpointType = ClassUtils.getUserClass(endpointType); Set<Method> methods = findEndpointMethods(endpointType, new ReflectionUtils.MethodFilter() { public boolean matches(Method method) { return !getLookupKeysForMethod(method).isEmpty(); } }); for (Method method : methods) { List<T> keys = getLookupKeysForMethod(method); for (T key : keys) { registerEndpoint(key, new MethodEndpoint(beanName, getApplicationContext(), method)); } } }
/** * Helper method that registers the methods of the given class. This method iterates over the methods of the class, * and calls {@link #getLookupKeyForMethod(Method)} for each. If this returns a string, the method is registered * using {@link #registerEndpoint(Object, MethodEndpoint)}. * * @see #getLookupKeyForMethod(Method) * @see #getLookupKeysForMethod(Method) */ protected void registerMethods(String beanName) { Assert.hasText(beanName, "'beanName' must not be empty"); Class<?> endpointType = getApplicationContext().getType(beanName); endpointType = ClassUtils.getUserClass(endpointType); Set<Method> methods = findEndpointMethods(endpointType, new ReflectionUtils.MethodFilter() { public boolean matches(Method method) { return !getLookupKeysForMethod(method).isEmpty(); } }); for (Method method : methods) { List<T> keys = getLookupKeysForMethod(method); for (T key : keys) { registerEndpoint(key, new MethodEndpoint(beanName, getApplicationContext(), method)); } } }
/** * Helper method that registers the methods of the given class. This method iterates over the methods of the class, * and calls {@link #getLookupKeyForMethod(Method)} for each. If this returns a string, the method is registered * using {@link #registerEndpoint(Object, MethodEndpoint)}. * * @see #getLookupKeyForMethod(Method) * @see #getLookupKeysForMethod(Method) */ protected void registerMethods(String beanName) { Assert.hasText(beanName, "'beanName' must not be empty"); Class<?> endpointType = getApplicationContext().getType(beanName); endpointType = ClassUtils.getUserClass(endpointType); Set<Method> methods = findEndpointMethods(endpointType, new ReflectionUtils.MethodFilter() { public boolean matches(Method method) { return !getLookupKeysForMethod(method).isEmpty(); } }); for (Method method : methods) { List<T> keys = getLookupKeysForMethod(method); for (T key : keys) { registerEndpoint(key, new MethodEndpoint(beanName, getApplicationContext(), method)); } } }