Interface ClasspathItem
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
DirectoryClasspathItem,JarClasspathItem,JvmClasspathItem,MultipleItemsWrapperClasspathItem
One item in the classpath (e.g., a jar file).
FOR INTERNAL USE ONLY. THE API CAN CHANGE AT ANY TIME.
-
Method Summary
Modifier and TypeMethodDescriptiongetChildren(String path) Get the children of a path.getResourceAsStream(String path) Get an input stream for a resource.booleanisDirectory(String path) Test whether a path points to a directory.booleanisResourceExisting(String path) Test whether a resource exists.Methods inherited from interface java.lang.AutoCloseable
close
-
Method Details
-
isResourceExisting
Test whether a resource exists.- Parameters:
path- Path to the resource- Returns:
trueif the resource exists,falseotherwise
-
isDirectory
Test whether a path points to a directory.- Parameters:
path- Path to the resource- Returns:
trueif the path points to a directory,falseotherwise
-
getChildren
Get the children of a path.- Parameters:
path- Path to the resource- Returns:
- List of children
- Throws:
IllegalArgumentException- If the path does not exist or is not a directory
-
getResourceAsStream
Get an input stream for a resource.- Parameters:
path- Path to the resource- Returns:
- Input stream for the resource
- Throws:
IllegalArgumentException- If the resource does not exist or is a directory
-