code: @Override
      public boolean implies(ProtectionDomain protectionDomain, Permission permission) {
  
          // this should never happen
          if (protectionDomain == null) {
              return false;
          }
  
          // everything is granted in this case
          if (protectionDomain.getCodeSource() == null) {
              return true;
          }
  
          if (Priority.GRANT.equals(priority)) { // branch for grant priority
              if (debug) {
                  ProGradePolicyDebugger.log("Searching for granting for permission: " + permission + " ...");
              }
              if (grantEntriesImplies(protectionDomain, permission)) {
                  if (debug) {
                      ProGradePolicyDebugger.log("Granting permission found, grant access.");
                  }
                  return true;
              } else {
                  if (debug) {
                      ProGradePolicyDebugger.log("Granting permission wasn't found, searching for denying...");
                  }
                  boolean toReturn = !denyEntriesImplies(protectionDomain, permission);
                  if (debug) {
                      if (toReturn) {
                          ProGradePolicyDebugger.log("Denying permission wasn't found, grant access.");
                      } else {
                          ProGradePolicyDebugger.log("Denying permission found, deny access.");
                      }
                  }
                  return toReturn;
              }
          } else { // branch for deny priority
              if (debug) {
                  ProGradePolicyDebugger.log("Searching for denying for permission: " + permission + " ...");
              }
              if (denyEntriesImplies(protectionDomain, permission)) {
                  if (debug) {
                      ProGradePolicyDebugger.log("Denying permission found, deny access.");
                  }
                  return false;
              } else {
                  if (debug) {
                      ProGradePolicyDebugger.log("Denying permission wasn't found, searching for granting...");
                  }
                  boolean toReturn = grantEntriesImplies(protectionDomain, permission);
                  if (debug) {
                      if (toReturn) {
                          ProGradePolicyDebugger.log("Granting permission found, grant access.");
                      } else {
                          ProGradePolicyDebugger.log("Granting permission wasn't found, deny access.");
                      }
                  }
                  return toReturn;
              }
          }
      }
docs: Method for determining whether this ProgradePolicyEntry implies given permission.
  
  @param protectionDomain active ProtectionDomain to test
  @param permission Permission which need to be determined
  @return true if ProgradePolicyFile implies given Permission, false otherwise