org.jboss.resteasy.plugins.providers.multipart
Class FieldEnablerPrivilegedAction

java.lang.Object
  extended by org.jboss.resteasy.plugins.providers.multipart.FieldEnablerPrivilegedAction
All Implemented Interfaces:
java.security.PrivilegedAction<java.lang.Object>

public class FieldEnablerPrivilegedAction
extends java.lang.Object
implements java.security.PrivilegedAction<java.lang.Object>

Helper class to make a field accessible. Directly calling field.setAccessible(true); is not advised as it could be invoked in a context without security permissions. For more information please check java.security.AccessController API in JavaSE. Usage example: AccessController.doPrivileged(new FieldEnablerPrivilegedAction(field));

Author:
Attila Kiraly

Constructor Summary
FieldEnablerPrivilegedAction(java.lang.reflect.Field field)
           
 
Method Summary
 java.lang.Object run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldEnablerPrivilegedAction

public FieldEnablerPrivilegedAction(java.lang.reflect.Field field)
Method Detail

run

public java.lang.Object run()
Specified by:
run in interface java.security.PrivilegedAction<java.lang.Object>


Copyright © 2010. All Rights Reserved.