[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Field injection
adrian@jboss.org
do-not-reply at jboss.com
Thu Mar 13 11:46:50 EDT 2008
You should setAccessible(true) by default for non-public stuff.
Then if the somebody invokes on it you do the permission check
if a security manager is installed.
| private static Permission accessCheck = new ReflectPermission("suppressAccessChecks");
|
| if (notPublic)
| {
| SecurityManager sm = System.getSecurityManager();
| if (sm != null)
| sm.checkPermission(accessCheck);
| }
|
JBREFLECT-2 is just finding a portable way to do what setAccesible(true) does
across JVMs for the javassist generated "reflection" objects (which are
more efficient than the JDK classes).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4136340#4136340
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4136340
More information about the jboss-dev-forums
mailing list