AccessController Algorithm - Stage 1
Build AccessControlContext for use in stage 2
- For each class on the thread stack:
- Get the class's ProtectionDomain
- If the stack frame is annotated by a
doPrivileged(),
- Exit the loop
- If the last stack frame checked is not annotated
with by a doPrivileged(),
- Add the ProtectionDomains inherited by the
current thread when the current thread was
instantiated