private static Method findAnnotatedMethod(final Method m) { final Method am = findAnnotatedMethod(m.getDeclaringClass(), m); return (am != null) ? am : m; }
private static Method findAnnotatedMethod(final Method m) { final Method am = findAnnotatedMethod(m.getDeclaringClass(), m); return (am != null) ? am : m; }
private static Method findAnnotatedMethod(final Class<?> c, Method m) { if (c == Object.class) { return null; } m = AccessController.doPrivileged(ReflectionHelper.findMethodOnClassPA(c, m)); if (m == null) { return null; } if (hasAnnotations(m)) { return m; } // Super classes take precedence over interfaces final Class<?> sc = c.getSuperclass(); if (sc != null && sc != Object.class) { final Method sm = findAnnotatedMethod(sc, m); if (sm != null) { return sm; } } for (final Class<?> ic : c.getInterfaces()) { final Method im = findAnnotatedMethod(ic, m); if (im != null) { return im; } } return null; }
/** * Create annotated method instance from the {@link Method Java method}. * * @param method Java method. */ public AnnotatedMethod(final Method method) { this.m = method; this.am = findAnnotatedMethod(method); if (method.equals(am)) { methodAnnotations = method.getAnnotations(); parameterAnnotations = method.getParameterAnnotations(); } else { methodAnnotations = mergeMethodAnnotations(method, am); parameterAnnotations = mergeParameterAnnotations(method, am); } }
private static Method findAnnotatedMethod(final Class<?> c, Method m) { if (c == Object.class) { return null; } m = AccessController.doPrivileged(ReflectionHelper.findMethodOnClassPA(c, m)); if (m == null) { return null; } if (hasAnnotations(m)) { return m; } // Super classes take precedence over interfaces final Class<?> sc = c.getSuperclass(); if (sc != null && sc != Object.class) { final Method sm = findAnnotatedMethod(sc, m); if (sm != null) { return sm; } } for (final Class<?> ic : c.getInterfaces()) { final Method im = findAnnotatedMethod(ic, m); if (im != null) { return im; } } return null; }
/** * Create annotated method instance from the {@link Method Java method}. * * @param method Java method. */ public AnnotatedMethod(final Method method) { this.m = method; this.am = findAnnotatedMethod(method); if (method.equals(am)) { methodAnnotations = method.getAnnotations(); parameterAnnotations = method.getParameterAnnotations(); } else { methodAnnotations = mergeMethodAnnotations(method, am); parameterAnnotations = mergeParameterAnnotations(method, am); } }
private static Method findAnnotatedMethod(final Method m) { final Method am = findAnnotatedMethod(m.getDeclaringClass(), m); return (am != null) ? am : m; }
/** * Create annotated method instance from the {@link Method Java method}. * * @param method Java method. */ public AnnotatedMethod(final Method method) { this.m = method; this.am = findAnnotatedMethod(method); if (method.equals(am)) { methodAnnotations = method.getAnnotations(); parameterAnnotations = method.getParameterAnnotations(); } else { methodAnnotations = mergeMethodAnnotations(method, am); parameterAnnotations = mergeParameterAnnotations(method, am); } }
private static Method findAnnotatedMethod(final Class<?> c, Method m) { if (c == Object.class) { return null; } m = AccessController.doPrivileged(ReflectionHelper.findMethodOnClassPA(c, m)); if (m == null) { return null; } if (hasAnnotations(m)) { return m; } // Super classes take precedence over interfaces final Class<?> sc = c.getSuperclass(); if (sc != null && sc != Object.class) { final Method sm = findAnnotatedMethod(sc, m); if (sm != null) { return sm; } } for (final Class<?> ic : c.getInterfaces()) { final Method im = findAnnotatedMethod(ic, m); if (im != null) { return im; } } return null; }
private static Method findAnnotatedMethod(final Method m) { final Method am = findAnnotatedMethod(m.getDeclaringClass(), m); return (am != null) ? am : m; }
private static Method findAnnotatedMethod(final Method m) { final Method am = findAnnotatedMethod(m.getDeclaringClass(), m); return (am != null) ? am : m; }
private static Method findAnnotatedMethod(final Method m) { final Method am = findAnnotatedMethod(m.getDeclaringClass(), m); return (am != null) ? am : m; }
private static Method findAnnotatedMethod(final Method m) { final Method am = findAnnotatedMethod(m.getDeclaringClass(), m); return (am != null) ? am : m; }
/** * Create annotated method instance from the {@link Method Java method}. * * @param method Java method. */ public AnnotatedMethod(final Method method) { this.m = method; this.am = findAnnotatedMethod(method); if (method.equals(am)) { methodAnnotations = method.getAnnotations(); parameterAnnotations = method.getParameterAnnotations(); } else { methodAnnotations = mergeMethodAnnotations(method, am); parameterAnnotations = mergeParameterAnnotations(method, am); } }
private static Method findAnnotatedMethod(final Class<?> c, Method m) { if (c == Object.class) { return null; } m = AccessController.doPrivileged(ReflectionHelper.findMethodOnClassPA(c, m)); if (m == null) { return null; } if (hasAnnotations(m)) { return m; } // Super classes take precedence over interfaces final Class<?> sc = c.getSuperclass(); if (sc != null && sc != Object.class) { final Method sm = findAnnotatedMethod(sc, m); if (sm != null) { return sm; } } for (final Class<?> ic : c.getInterfaces()) { final Method im = findAnnotatedMethod(ic, m); if (im != null) { return im; } } return null; }
private static Method findAnnotatedMethod(final Class<?> c, Method m) { if (c == Object.class) { return null; } m = AccessController.doPrivileged(ReflectionHelper.findMethodOnClassPA(c, m)); if (m == null) { return null; } if (hasAnnotations(m)) { return m; } // Super classes take precedence over interfaces final Class<?> sc = c.getSuperclass(); if (sc != null && sc != Object.class) { final Method sm = findAnnotatedMethod(sc, m); if (sm != null) { return sm; } } for (final Class<?> ic : c.getInterfaces()) { final Method im = findAnnotatedMethod(ic, m); if (im != null) { return im; } } return null; }
/** * Create annotated method instance from the {@link Method Java method}. * * @param method Java method. */ public AnnotatedMethod(final Method method) { this.m = method; this.am = findAnnotatedMethod(method); if (method.equals(am)) { methodAnnotations = method.getAnnotations(); parameterAnnotations = method.getParameterAnnotations(); } else { methodAnnotations = mergeMethodAnnotations(method, am); parameterAnnotations = mergeParameterAnnotations(method, am); } }
private static Method findAnnotatedMethod(final Class<?> c, Method m) { if (c == Object.class) { return null; } m = AccessController.doPrivileged(ReflectionHelper.findMethodOnClassPA(c, m)); if (m == null) { return null; } if (hasAnnotations(m)) { return m; } // Super classes take precedence over interfaces final Class<?> sc = c.getSuperclass(); if (sc != null && sc != Object.class) { final Method sm = findAnnotatedMethod(sc, m); if (sm != null) { return sm; } } for (final Class<?> ic : c.getInterfaces()) { final Method im = findAnnotatedMethod(ic, m); if (im != null) { return im; } } return null; }
/** * Create annotated method instance from the {@link Method Java method}. * * @param method Java method. */ public AnnotatedMethod(final Method method) { this.m = method; this.am = findAnnotatedMethod(method); if (method.equals(am)) { methodAnnotations = method.getAnnotations(); parameterAnnotations = method.getParameterAnnotations(); } else { methodAnnotations = mergeMethodAnnotations(method, am); parameterAnnotations = mergeParameterAnnotations(method, am); } }
/** * Create annotated method instance from the {@link Method Java method}. * * @param method Java method. */ public AnnotatedMethod(final Method method) { this.m = method; this.am = findAnnotatedMethod(method); if (method.equals(am)) { methodAnnotations = method.getAnnotations(); parameterAnnotations = method.getParameterAnnotations(); } else { methodAnnotations = mergeMethodAnnotations(method, am); parameterAnnotations = mergeParameterAnnotations(method, am); } }