public class Jre19Compat extends Jre12Compat
canonCachesDisabled, canonCachesDisabledLock, getApplicationProtocolMethod, setApplicationProtocolsMethod, USE_CANON_CACHES_CMD_ARG, useCanonCachesField, useCanonCachesFieldLock| Constructor and Description |
|---|
Jre19Compat() |
| 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.
|
java.lang.Object |
getExecutor(java.lang.Thread thread)
Obtains the executor, if any, used to create the provided thread.
|
java.lang.String |
getModuleName(java.lang.Class<?> type)
What is the module of the given class?
|
java.net.SocketAddress |
getUnixDomainSocketAddress(java.lang.String path)
Return Unix domain socket address for given path.
|
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() |
java.nio.channels.ServerSocketChannel |
openUnixDomainServerSocketChannel()
Create server socket channel using the Unix domain socket ProtocolFamily.
|
java.nio.channels.SocketChannel |
openUnixDomainSocketChannel()
Create socket channel using the Unix domain socket ProtocolFamily.
|
ensureUseCanonCachesFieldIsPopulated, isCanonCachesDisabledcallAs, createVirtualThreadBuilder, disableCanonCaches, getApplicationProtocol, getInstance, isAlpnSupported, isGraalAvailable, isJre11Available, isJre12Available, isJre16Available, isJre19Available, isJre21Available, isJre22Available, isJre9Available, jarFileNewInstance, setApplicationProtocols, threadBuilderStartpublic java.lang.Object getExecutor(java.lang.Thread thread)
throws java.lang.NoSuchFieldException,
java.lang.SecurityException,
java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
JreCompatgetExecutor in class JreCompatthread - The thread to examinejava.lang.NoSuchFieldException - If a field used via reflection to obtain the executor cannot
be foundjava.lang.SecurityException - If a security exception occurs while trying to identify the
executorjava.lang.IllegalArgumentException - If the instance object does not match the class of the field
when obtaining a field value via reflectionjava.lang.IllegalAccessException - If a field is not accessible due to access restrictionspublic java.net.SocketAddress getUnixDomainSocketAddress(java.lang.String path)
JreCompatgetUnixDomainSocketAddress in class JreCompatpath - The pathpublic java.nio.channels.ServerSocketChannel openUnixDomainServerSocketChannel()
JreCompatopenUnixDomainServerSocketChannel in class JreCompatpublic java.nio.channels.SocketChannel openUnixDomainSocketChannel()
JreCompatopenUnixDomainSocketChannel 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.