@Override public boolean implies(ProtectionDomain pd,Permission p){
  PolicyInfo pi=policyInfo.get();
  ProtectionDomainCache pdMap=pi.getPdMapping();
  PermissionCollection pc=pdMap.get(pd);
  if (pc != null) {
    return pc.implies(p);
  }
  pc=getPermissions(pd);
  if (pc == null) {
    return false;
  }
  pdMap.put(pd,pc);
  return pc.implies(p);
}

@ Override public boolean implies ( ProtectionDomain pd , Permission p ) { PolicyInfo pi = policyInfo . get ( ) ; ProtectionDomainCache pdMap = pi . getPdMapping ( ) ; PermissionCollection pc = pdMap . get ( pd ) ; if ( pc != null ) { return pc . implies ( p ) ; } pc = getPermissions ( pd ) ; if ( pc == null ) { return false ; } pdMap . put ( pd , pc ) ; return pc . implies ( p ) ; }
evaluates the the global policy for the permissions granted to the protectiondomain and tests whether the permission is granted .
