All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy