@Override public boolean accept(Method method, Class<?> proxySuperclass) { Class<?> declaringClass = method.getDeclaringClass(); if (declaringClass != null) { Package pack = declaringClass.getPackage(); if (pack != null && pack.getName().startsWith(ProxyFactory.JAVA)) { if (Reflections.isPackagePrivate(method.getModifiers())) { return false; } Class<?>[] parameterTypes = method.getParameterTypes(); for (Class<?> parameterType : parameterTypes) { if (Reflections.isPackagePrivate(parameterType.getModifiers())) { return false; } } } } return true; } };
@Override public boolean accept(Method method, Class<?> proxySuperclass) { Class<?> declaringClass = method.getDeclaringClass(); if (declaringClass != null) { Package pack = declaringClass.getPackage(); if (pack != null && pack.getName().startsWith(ProxyFactory.JAVA)) { if (Reflections.isPackagePrivate(method.getModifiers())) { return false; } Class<?>[] parameterTypes = method.getParameterTypes(); for (Class<?> parameterType : parameterTypes) { if (Reflections.isPackagePrivate(parameterType.getModifiers())) { return false; } } } } return true; } };
@Override public boolean accept(Method method, Class<?> proxySuperclass) { Class<?> declaringClass = method.getDeclaringClass(); if (declaringClass != null) { Package pack = declaringClass.getPackage(); if (pack != null && pack.getName().startsWith(ProxyFactory.JAVA)) { if (Reflections.isPackagePrivate(method.getModifiers())) { return false; } Class<?>[] parameterTypes = method.getParameterTypes(); for (Class<?> parameterType : parameterTypes) { if (Reflections.isPackagePrivate(parameterType.getModifiers())) { return false; } } } } return true; } };
@Override public boolean accept(Method method, Class<?> proxySuperclass) { Class<?> declaringClass = method.getDeclaringClass(); if (declaringClass != null) { Package pack = declaringClass.getPackage(); if (pack != null && pack.getName().startsWith(ProxyFactory.JAVA)) { if (Reflections.isPackagePrivate(method.getModifiers())) { return false; } Class<?>[] parameterTypes = method.getParameterTypes(); for (Class<?> parameterType : parameterTypes) { if (Reflections.isPackagePrivate(parameterType.getModifiers())) { return false; } } } } return true; } };
@Override public boolean isPackagePrivate() { return Reflections.isPackagePrivate(getJavaClass().getModifiers()); }
@Override public boolean isPackagePrivate() { return Reflections.isPackagePrivate(getJavaClass().getModifiers()); }
@Override public boolean isPackagePrivate() { return Reflections.isPackagePrivate(getJavaClass().getModifiers()); }
@Override public boolean isPackagePrivate() { return Reflections.isPackagePrivate(getJavaClass().getModifiers()); }
@Override public boolean isPackagePrivate() { return Reflections.isPackagePrivate(getJavaClass().getModifiers()); }
public boolean isPackagePrivate() { return Reflections.isPackagePrivate(getJavaMember().getModifiers()); }
public boolean isPackagePrivate() { return Reflections.isPackagePrivate(getJavaMember().getModifiers()); }
public boolean isPackagePrivate() { return Reflections.isPackagePrivate(getJavaMember().getModifiers()); }
@Override public boolean isPackagePrivate() { return Reflections.isPackagePrivate(getJavaClass().getModifiers()); }
public boolean isPackagePrivate() { return Reflections.isPackagePrivate(getJavaMember().getModifiers()); }
public boolean isPackagePrivate() { return Reflections.isPackagePrivate(getJavaMember().getModifiers()); }
public boolean isPackagePrivate() { return Reflections.isPackagePrivate(getJavaMember().getModifiers()); }
@Override protected Method getMethod(Object receiver) throws NoSuchMethodException { final Map<Class<?>, Method> methods = this.methods; Method method = this.methods.get(receiver.getClass()); if (method == null) { // the same method may be written to the map twice, but that is ok // lookupMethod is very slow Method delegate = getAnnotated().getJavaMember(); if ((hasDecorators() || MethodInjectionPointType.INITIALIZER.equals(type)) && (isPrivate(delegate) || isPackagePrivate(delegate.getModifiers()) && !Objects.equals(delegate.getDeclaringClass().getPackage(), receiver.getClass().getPackage()))) { // Initializer methods and decorated beans - overriding does not apply to private methods and package-private methods where the subclass is in a different package method = accessibleMethod; } else { method = SecurityActions.lookupMethod(receiver.getClass(), delegate.getName(), delegate.getParameterTypes()); SecurityActions.ensureAccessible(method); } final Map<Class<?>, Method> newMethods = ImmutableMap.<Class<?>, Method>builder().putAll(methods).put(receiver.getClass(), method).build(); this.methods = newMethods; } return method; }
@Override protected Method getMethod(Object receiver) throws NoSuchMethodException { final Map<Class<?>, Method> methods = this.methods; Method method = this.methods.get(receiver.getClass()); if (method == null) { // the same method may be written to the map twice, but that is ok // lookupMethod is very slow Method delegate = getAnnotated().getJavaMember(); if ((hasDecorators() || MethodInjectionPointType.INITIALIZER.equals(type)) && (isPrivate(delegate) || isPackagePrivate(delegate.getModifiers()) && !Objects.equals(delegate.getDeclaringClass().getPackage(), receiver.getClass().getPackage()))) { // Initializer methods and decorated beans - overriding does not apply to private methods and package-private methods where the subclass is in a different package method = accessibleMethod; } else { method = SecurityActions.lookupMethod(receiver.getClass(), delegate.getName(), delegate.getParameterTypes()); SecurityActions.ensureAccessible(method); } final Map<Class<?>, Method> newMethods = ImmutableMap.<Class<?>, Method>builder().putAll(methods).put(receiver.getClass(), method).build(); this.methods = newMethods; } return method; }
@Override protected Method getMethod(Object receiver) throws NoSuchMethodException { final Map<Class<?>, Method> methods = this.methods; Method method = this.methods.get(receiver.getClass()); if (method == null) { // the same method may be written to the map twice, but that is ok // lookupMethod is very slow Method delegate = getAnnotated().getJavaMember(); if ((hasDecorators() || MethodInjectionPointType.INITIALIZER.equals(type)) && (isPrivate(delegate) || isPackagePrivate(delegate.getModifiers()) && !Objects.equals(delegate.getDeclaringClass().getPackage(), receiver.getClass().getPackage()))) { // Initializer methods and decorated beans - overriding does not apply to private methods and package-private methods where the subclass is in a different package method = accessibleMethod; } else { method = SecurityActions.lookupMethod(receiver.getClass(), delegate.getName(), delegate.getParameterTypes()); SecurityActions.ensureAccessible(method); } final Map<Class<?>, Method> newMethods = ImmutableMap.<Class<?>, Method>builder().putAll(methods).put(receiver.getClass(), method).build(); this.methods = newMethods; } return method; }
@Override protected Method getMethod(Object receiver) throws NoSuchMethodException { final Map<Class<?>, Method> methods = this.methods; Method method = this.methods.get(receiver.getClass()); if (method == null) { // the same method may be written to the map twice, but that is ok // lookupMethod is very slow Method delegate = getAnnotated().getJavaMember(); if ((hasDecorators() || MethodInjectionPointType.INITIALIZER.equals(type)) && (isPrivate(delegate) || isPackagePrivate(delegate.getModifiers()) && !Objects.equals(delegate.getDeclaringClass().getPackage(), receiver.getClass().getPackage()))) { // Initializer methods and decorated beans - overriding does not apply to private methods and package-private methods where the subclass is in a different package method = accessibleMethod; } else { method = SecurityActions.lookupMethod(receiver.getClass(), delegate.getName(), delegate.getParameterTypes()); SecurityActions.ensureAccessible(method); } final Map<Class<?>, Method> newMethods = ImmutableMap.<Class<?>, Method>builder().putAll(methods).put(receiver.getClass(), method).build(); this.methods = newMethods; } return method; }