public static boolean isNonPublicProxyClass(Class<?> cls){
  String name=cls.getName();
  int i=name.lastIndexOf('.');
  String pkg=(i != -1) ? name.substring(0,i) : "";
  return Proxy.isProxyClass(cls) && !pkg.equals(PROXY_PACKAGE);
}

public static boolean isNonPublicProxyClass ( Class < ? > cls ) { String name = cls . getName ( ) ; int i = name . lastIndexOf ( '.' ) ; String pkg = ( i != - 1 ) ? name . substring ( 0 , i ) : "" ; return Proxy . isProxyClass ( cls ) && ! pkg . equals ( PROXY_PACKAGE ) ; }
test if the given class is a proxy class that implements non - public interface . such proxy class may be in a non - restricted package that bypasses checkpackageaccess .
