JAVA Fine-grained Access Control-7
Here is what the usage of privileged code looks like. Note the use of Java's inner classes capability:(If you are using an anonymous inner class, any local variables you access must be final to make JAVA language looks like having closures.)
AccessController.doPrivileged (new PrivilegedAction()
{ <insert dangerous code here> return null; }