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

org.hibernate.validation.util.SetAccessibility Maven / Gradle / Ivy

Go to download

Module repackaging of the Hibernate validator library and Validation API (JSR 303)

There is a newer version: 3.0-JBoss-4.0.2_03
Show newest version
package org.hibernate.validation.util;

import java.lang.reflect.Member;
import java.security.PrivilegedAction;

import org.hibernate.validation.util.ReflectionHelper;

/**
 * @author Emmanuel Bernard
 */
public class SetAccessibility implements PrivilegedAction {
	private final Member member;

	public static SetAccessibility action(Member member) {
		return new SetAccessibility( member );
	}

	private SetAccessibility(Member member) {
		this.member = member;
	}

	public Object run() {
		ReflectionHelper.setAccessibility( member );
		return member;
	}
}