public class Jre12Compat extends JreCompat
canonCachesDisabled, canonCachesDisabledLock, getApplicationProtocolMethod, setApplicationProtocolsMethod, USE_CANON_CACHES_CMD_ARG, useCanonCachesField, useCanonCachesFieldLock| Constructor and Description |
|---|
Jre12Compat() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBootModulePath(java.util.Deque<java.net.URL> classPathUrlsToProcess)
Obtains the URLs for all the JARs on the module path when the JVM starts
and adds them to the provided Deque.
|
boolean |
canAccess(java.lang.Object base,
java.lang.reflect.AccessibleObject accessibleObject)
Is the accessibleObject accessible (as a result of appropriate module
exports) on the provided instance?
|
void |
disableCachingForJarUrlConnections()
Disables caching for JAR URL connections.
|
protected void |
ensureUseCanonCachesFieldIsPopulated() |
java.lang.String |
getModuleName(java.lang.Class<?> type)
What is the module of the given class?
|
boolean |
isCanonCachesDisabled() |
boolean |
isExported(java.lang.Class<?> type)
Is the given class in an exported package?
|
boolean |
isInstanceOfInaccessibleObjectException(java.lang.Throwable t)
Test if the provided exception is an instance of
java.lang.reflect.InaccessibleObjectException.
|
boolean |
jarFileIsMultiRelease(java.util.jar.JarFile jarFile)
Is this JarFile a multi-release JAR file.
|
java.util.jar.JarFile |
jarFileNewInstance(java.io.File f)
Creates a new JarFile instance.
|
int |
jarFileRuntimeMajorVersion() |
callAs, createVirtualThreadBuilder, disableCanonCaches, getApplicationProtocol, getExecutor, getInstance, getUnixDomainSocketAddress, isAlpnSupported, isGraalAvailable, isJre11Available, isJre12Available, isJre16Available, isJre19Available, isJre21Available, isJre22Available, isJre9Available, jarFileNewInstance, openUnixDomainServerSocketChannel, openUnixDomainSocketChannel, setApplicationProtocols, threadBuilderStartpublic boolean isCanonCachesDisabled()
isCanonCachesDisabled in class JreCompatprotected void ensureUseCanonCachesFieldIsPopulated()
ensureUseCanonCachesFieldIsPopulated in class JreCompatpublic boolean isInstanceOfInaccessibleObjectException(java.lang.Throwable t)
JreCompatisInstanceOfInaccessibleObjectException in class JreCompatt - The exception to testtrue if the exception is an instance of
InaccessibleObjectException, otherwise falsepublic void disableCachingForJarUrlConnections()
throws java.io.IOException
JreCompatdisableCachingForJarUrlConnections in class JreCompatjava.io.IOException - If a dummy JAR URLConnection can not be createdpublic void addBootModulePath(java.util.Deque<java.net.URL> classPathUrlsToProcess)
JreCompataddBootModulePath in class JreCompatclassPathUrlsToProcess - The Deque to which the modules should be
addedpublic java.util.jar.JarFile jarFileNewInstance(java.io.File f)
throws java.io.IOException
JreCompatjarFileNewInstance in class JreCompatf - The JAR file to openjava.io.IOException - If an I/O error occurs creating the JarFile instancepublic boolean jarFileIsMultiRelease(java.util.jar.JarFile jarFile)
JreCompatjarFileIsMultiRelease in class JreCompatjarFile - The JarFile to testtrue If it is a multi-release JAR file and is configured
to behave as such.public int jarFileRuntimeMajorVersion()
jarFileRuntimeMajorVersion in class JreCompatpublic boolean canAccess(java.lang.Object base,
java.lang.reflect.AccessibleObject accessibleObject)
JreCompatpublic boolean isExported(java.lang.Class<?> type)
JreCompatisExported in class JreCompattype - The class to testtrue for Java 8. true if the enclosing
package is exported for Java 9+public java.lang.String getModuleName(java.lang.Class<?> type)
JreCompatgetModuleName in class JreCompattype - The class to testtrue for Java 8. true if the enclosing
package is exported for Java 9+Copyright © 2000-2024 Apache Software Foundation.
Apache Tomcat, Tomcat, Apache, the Apache Tomcat logo and the Apache logo are either registered trademarks or trademarks of the Apache Software Foundation.