Top Description Inners Fields Constructors Methods
org.jboss.modules

pack-priv final Class JDKSpecific

extends Object
Class Inheritance
Static Imports
java.nio.file.FileVisitResult.CONTINUE, .FileVisitResult.SKIP_SUBTREE, java.security.AccessController.doPrivileged

JDK-specific classes which are replaced for different JDK major versions. This one is for Java 9 only.
Authors
David M. Lloyd, Richard Opalka

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
pack-priv static final Set<String>
pack-priv static final ClassLoader
pack-priv static final StackWalker
pack-priv static final ClassLoader

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static <T> Iterable<T>
findServices(final Class<T> serviceType, final Predicate<Class<?>> filter, final ClassLoader classLoader)

pack-priv static Class<?>
pack-priv static Class<?>
pack-priv static JarFile
getJarFile(final File name, final boolean verify)

pack-priv static Set<String>
pack-priv static Package
getPackage(ClassLoader cl, String packageName)

pack-priv static ClassLoader
pack-priv static Class<?>
getSystemClass(final ConcurrentClassLoader caller, final String className)

pack-priv static LocalLoader
pack-priv static URL
pack-priv static InputStream
pack-priv static Enumeration<URL>
pack-priv static boolean
private static Class<?>
private static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

MODULES_PACKAGESback to summary
pack-priv static final Set<String> MODULES_PACKAGES
OUR_CLASS_LOADERback to summary
pack-priv static final ClassLoader OUR_CLASS_LOADER
STACK_WALKERback to summary
pack-priv static final StackWalker STACK_WALKER
SYSTEM_CLASS_LOADERback to summary
pack-priv static final ClassLoader SYSTEM_CLASS_LOADER

Constructor Detail

JDKSpecificback to summary
pack-priv JDKSpecific()

Method Detail

findServicesback to summary
pack-priv static <T> Iterable<T> findServices(final Class<T> serviceType, final Predicate<Class<?>> filter, final ClassLoader classLoader)
getCallingClassback to summary
pack-priv static Class<?> getCallingClass()
getCallingUserClassback to summary
pack-priv static Class<?> getCallingUserClass()
getJarFileback to summary
pack-priv static JarFile getJarFile(final File name, final boolean verify) throws IOException
getJDKPathsback to summary
pack-priv static Set<String> getJDKPaths()
getPackageback to summary
pack-priv static Package getPackage(ClassLoader cl, String packageName)
getPlatformClassLoaderback to summary
pack-priv static ClassLoader getPlatformClassLoader()
getSystemClassback to summary
pack-priv static Class<?> getSystemClass(final ConcurrentClassLoader caller, final String className) throws ClassNotFoundException
getSystemLocalLoaderback to summary
pack-priv static LocalLoader getSystemLocalLoader()
getSystemResourceback to summary
pack-priv static URL getSystemResource(final String name)
getSystemResourceAsStreamback to summary
pack-priv static InputStream getSystemResourceAsStream(final String name)
getSystemResourcesback to summary
pack-priv static Enumeration<URL> getSystemResources(final String name) throws IOException
isParallelCapableback to summary
pack-priv static boolean isParallelCapable(ConcurrentClassLoader cl)
processFrameback to summary
private static Class<?> processFrame(Stream<StackWalker.StackFrame> stream)
processRuntimeImagesback to summary
private static void processRuntimeImages(final Set<String> pathSet)
org.jboss.modules back to summary

private Class JDKSpecific.JrtFileVisitor

extends Object
implements FileVisitor<Path>
Class Inheritance
All Implemented Interfaces
java.nio.file.FileVisitor

Field Summary

Modifier and TypeField and Description
private static final String
private final Set<String>
private static final String

Constructor Summary

AccessConstructor and Description
private
JrtFileVisitor(final Set<String> pathSet)

Method Summary

Modifier and TypeMethod and Description
public FileVisitResult
postVisitDirectory(final Path
a reference to the directory
dir
,
final IOException
null if the iteration of the directory completes without an error; otherwise the I/O exception that caused the iteration of the directory to complete prematurely
exc
)

Implements java.nio.file.FileVisitor.postVisitDirectory.

Invoked for a directory after entries in the directory, and all of their descendants, have been visited.
public FileVisitResult
preVisitDirectory(final Path
a reference to the directory
dir
,
final BasicFileAttributes
the directory's basic attributes
attrs
)

Implements java.nio.file.FileVisitor.preVisitDirectory.

Invoked for a directory before entries in the directory are visited.
public FileVisitResult
visitFile(final Path
a reference to the file
file
,
final BasicFileAttributes
the file's basic attributes
attrs
)

Implements java.nio.file.FileVisitor.visitFile.

Invoked for a file in a directory.
public FileVisitResult
visitFileFailed(final Path
a reference to the file
file
,
final IOException
the I/O exception that prevented the file from being visited
exc
)

Implements java.nio.file.FileVisitor.visitFileFailed.

Invoked for a file that could not be visited.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

PACKAGESback to summary
private static final String PACKAGES
pathSetback to summary
private final Set<String> pathSet
SLASHback to summary
private static final String SLASH

Constructor Detail

JrtFileVisitorback to summary
private JrtFileVisitor(final Set<String> pathSet)

Method Detail

postVisitDirectoryback to summary
public FileVisitResult postVisitDirectory(final Path dir, final IOException exc)

Implements java.nio.file.FileVisitor.postVisitDirectory.

Doc from java.nio.file.FileVisitor.postVisitDirectory.

Invoked for a directory after entries in the directory, and all of their descendants, have been visited. This method is also invoked when iteration of the directory completes prematurely (by a visitFile method returning SKIP_SIBLINGS, or an I/O error when iterating over the directory).

Parameters
dir:Path

a reference to the directory

exc:IOException

null if the iteration of the directory completes without an error; otherwise the I/O exception that caused the iteration of the directory to complete prematurely

Returns:FileVisitResult

the visit result

Annotations
@Override
preVisitDirectoryback to summary
public FileVisitResult preVisitDirectory(final Path dir, final BasicFileAttributes attrs)

Implements java.nio.file.FileVisitor.preVisitDirectory.

Doc from java.nio.file.FileVisitor.preVisitDirectory.

Invoked for a directory before entries in the directory are visited.

If this method returns CONTINUE, then entries in the directory are visited. If this method returns SKIP_SUBTREE or SKIP_SIBLINGS then entries in the directory (and any descendants) will not be visited.

Parameters
dir:Path

a reference to the directory

attrs:BasicFileAttributes

the directory's basic attributes

Returns:FileVisitResult

the visit result

Annotations
@Override
visitFileback to summary
public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs)

Implements java.nio.file.FileVisitor.visitFile.

Doc from java.nio.file.FileVisitor.visitFile.

Invoked for a file in a directory.

Parameters
file:Path

a reference to the file

attrs:BasicFileAttributes

the file's basic attributes

Returns:FileVisitResult

the visit result

Annotations
@Override
visitFileFailedback to summary
public FileVisitResult visitFileFailed(final Path file, final IOException exc)

Implements java.nio.file.FileVisitor.visitFileFailed.

Doc from java.nio.file.FileVisitor.visitFileFailed.

Invoked for a file that could not be visited. This method is invoked if the file's attributes could not be read, the file is a directory that could not be opened, and other reasons.

Parameters
file:Path

a reference to the file

exc:IOException

the I/O exception that prevented the file from being visited

Returns:FileVisitResult

the visit result

Annotations
@Override