code: public X500Principal asX500Principal() {
          if (x500Principal == null) {
              try {
                  Object[] args = new Object[] {this};
                  x500Principal =
                          (X500Principal)principalConstructor.newInstance(args);
              } catch (Exception e) {
                  throw new RuntimeException("Unexpected exception", e);
              }
          }
          return x500Principal;
      }
docs: Get an X500Principal backed by this X500Name.
  
  Note that we are using privileged reflection to access the hidden
  package private constructor in X500Principal.