org.infinispan.cdi.common.util.SetAccessiblePrivilegedAction Maven / Gradle / Ivy
package org.infinispan.cdi.common.util;
import java.lang.reflect.AccessibleObject;
import java.security.PrivilegedAction;
/**
* A {@link PrivilegedAction} that calls
* {@link AccessibleObject#setAccessible(boolean)}
*
* @author Stuart Douglas
*/
public class SetAccessiblePrivilegedAction implements PrivilegedAction {
private final AccessibleObject member;
public SetAccessiblePrivilegedAction(AccessibleObject member) {
this.member = member;
}
public Void run() {
member.setAccessible(true);
return null;
}
}