private static ForDeclaredMethods getDeclaredMethodMemberSubstitution() { // this should only be called if the security manager is enabled, thus the privileged calls return MemberSubstitution.relaxed() .method( ElementMatchers.is( AccessController.doPrivileged( new GetDeclaredMethodAction( Class.class, "getDeclaredMethod", String.class, Class[].class ) ) ) ) .replaceWith( AccessController.doPrivileged( new GetDeclaredMethodAction( HibernateMethodLookupDispatcher.class, "getDeclaredMethod", Class.class, String.class, Class[].class ) ) ) .on( ElementMatchers.isTypeInitializer() ); }
private static ForDeclaredMethods getMethodMemberSubstitution() { // this should only be called if the security manager is enabled, thus the privileged calls return MemberSubstitution.relaxed() .method( ElementMatchers.is( AccessController.doPrivileged( new GetDeclaredMethodAction( Class.class, "getMethod", String.class, Class[].class ) ) ) ) .replaceWith( AccessController.doPrivileged( new GetDeclaredMethodAction( HibernateMethodLookupDispatcher.class, "getMethod", Class.class, String.class, Class[].class ) ) ) .on( ElementMatchers.isTypeInitializer() ); }
private static ForDeclaredMethods getDeclaredMethodMemberSubstitution() { // this should only be called if the security manager is enabled, thus the privileged calls return MemberSubstitution.relaxed() .method( ElementMatchers.is( AccessController.doPrivileged( new GetDeclaredMethodAction( Class.class, "getDeclaredMethod", String.class, Class[].class ) ) ) ) .replaceWith( AccessController.doPrivileged( new GetDeclaredMethodAction( HibernateMethodLookupDispatcher.class, "getDeclaredMethod", Class.class, String.class, Class[].class ) ) ) .on( ElementMatchers.isTypeInitializer() ); }
private static ForDeclaredMethods getMethodMemberSubstitution() { // this should only be called if the security manager is enabled, thus the privileged calls return MemberSubstitution.relaxed() .method( ElementMatchers.is( AccessController.doPrivileged( new GetDeclaredMethodAction( Class.class, "getMethod", String.class, Class[].class ) ) ) ) .replaceWith( AccessController.doPrivileged( new GetDeclaredMethodAction( HibernateMethodLookupDispatcher.class, "getMethod", Class.class, String.class, Class[].class ) ) ) .on( ElementMatchers.isTypeInitializer() ); }