Class PolicyParser.PrincipalEntry

java.lang.Object
net.adoptopenjdk.icedteaweb.client.policyeditor.PolicyParser.PrincipalEntry
All Implemented Interfaces:
Principal
Enclosing class:
PolicyParser

public static class PolicyParser.PrincipalEntry extends Object implements Principal
Principal info (class and name) in a grant entry
Since:
1.2 Copy of OpenJDK 21 sun.security.provider.PolicyParser (removed in JDK 24), openjdk/jdk21u bb6b279495ceff8442dbd0225756b92d466d5309, minus property expansion and debug output.
  • Field Details

  • Constructor Details

    • PrincipalEntry

      public PrincipalEntry(String principalClass, String principalName)
      A PrincipalEntry consists of the Principal class and Principal name.
      Parameters:
      principalClass - the Principal class
      principalName - the Principal name
      Throws:
      NullPointerException - if principalClass or principalName are null
  • Method Details

    • isWildcardName

      boolean isWildcardName()
    • isWildcardClass

      boolean isWildcardClass()
    • isReplaceName

      boolean isReplaceName()
    • getPrincipalClass

      public String getPrincipalClass()
    • getPrincipalName

      public String getPrincipalName()
    • getDisplayClass

      public String getDisplayClass()
    • getDisplayName

      public String getDisplayName()
    • getDisplayName

      public String getDisplayName(boolean addQuote)
    • getName

      public String getName()
      Specified by:
      getName in interface Principal
    • toString

      public String toString()
      Specified by:
      toString in interface Principal
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Test for equality between the specified object and this object. Two PrincipalEntries are equal if their class and name values are equal.
      Specified by:
      equals in interface Principal
      Overrides:
      equals in class Object
      Parameters:
      obj - the object to test for equality with this object
      Returns:
      true if the objects are equal, false otherwise
    • hashCode

      public int hashCode()
      Return a hashcode for this PrincipalEntry.
      Specified by:
      hashCode in interface Principal
      Overrides:
      hashCode in class Object
      Returns:
      a hashcode for this PrincipalEntry
    • write

      public void write(PrintWriter out)