code: private ProGradePolicyEntry initializePolicyEntry(ParsedPolicyEntry parsedEntry, KeyStore keystore, boolean grant)
              throws Exception {
          ProGradePolicyEntry entry = new ProGradePolicyEntry(grant, debug);
  
          // codesource
          if (parsedEntry.getCodebase() != null || parsedEntry.getSignedBy() != null) {
              CodeSource cs = createCodeSource(parsedEntry, keystore);
              if (cs != null) {
                  entry.setCodeSource(cs);
              } else {
                  // it happens if there is signedBy which isn't contain in keystore
                  entry.setNeverImplies(true);
                  // any next isn't needed because entry will never implies anything
                  return entry;
              }
          }
  
          // principals
          for (ParsedPrincipal p : parsedEntry.getPrincipals()) {
              if (p.hasAlias()) {
                  String principal = gainPrincipalFromAlias(expandStringWithProperty(p.getAlias()), keystore);
                  if (principal != null) {
                      entry.addPrincipal(new ProGradePrincipal("javax.security.auth.x500.X500Principal", principal, false, false));
                  } else {
                      // it happens if there is alias which isn't contain in keystore
                      entry.setNeverImplies(true);
                      // any next isn't needed because entry will never implies anything
                      return entry;
                  }
              } else {
                  entry.addPrincipal(new ProGradePrincipal(p.getPrincipalClass(), expandStringWithProperty(p.getPrincipalName()),
                          p.hasClassWildcard(), p.hasNameWildcard()));
              }
          }
  
          // permissions
          for (ParsedPermission p : parsedEntry.getPermissions()) {
              Permission perm = createPermission(p, keystore);
              if (perm != null) {
                  entry.addPermission(perm);
              }
          }
  
          return entry;
      }
docs: Private method for initializing one policy entry.
  
  @param parsedEntry parsed entry using for creating new entry ProgradePolicyEntry
  @param keystore KeyStore which is used by this policy file
  @param grant true for priority grant, false for priority deny
  @return ProgradePolicyEntry which represents this parsedEntry
  @throws Exception when there was any problem during initializing of policy entry