title: Is there a way to access package-private String.isLatin1() from java.util package using jdk.internal.access.SharedSecrets?
body: <p>I'm trying to access <code>String.isLatin1()</code> which is declared (as of JDK 14) as </p>
  
  <pre class="lang-java prettyprint-override"><code>boolean isLatin1() {
      return COMPACT_STRINGS &amp;&amp; coder == LATIN1;
  }
  </code></pre>
  
  <p>I can do this with reflection</p>
  
  <pre class="lang-java prettyprint-override"><code>Method isLatin1 = String.class.getDeclaredMethod("isLatin1");
  isLatin1.setAccessible(true);
  isLatin1.invoke(""); //true
  </code></pre>
  
  <p>but I wonder whether I can do the same with <code>SharedSecrets</code>?</p>
  
  <p>I've tried</p>
  
  <pre class="lang-java prettyprint-override"><code>SharedSecrets.getJavaLangAccess().getDeclaredPublicMethods(String.class, "isLatin1");
  </code></pre>
  
  <p>but for obvious reason it returns an empty list. Also I've tried to utilize <code>jdk.internal.access.JavaLangReflectAccess</code> available from <code>SharedSecredts</code>, but it doesn't have any suitable method.</p>