public class ClasspathInventory extends Object
Used in development mode to get timestamps for .class and other files, and the contents of resources.
| Modifier and Type | Method and Description |
|---|---|
static ClasspathInventory |
create(ClassLoader cl)
Create an inventory for the specified classloader.
|
static ClasspathInventory |
create(URL[] urls)
Create an inventory on the specified URLs.
|
IModifyableResource |
findClassSource(Class<?> clz)
Tries to find the .class file for the specified class.
|
IModifyableResource |
findResourceSource(String resourcePath)
Locate the source for some file that is part of the classpath (either a class resource or a .class file itself),
and return a timestamp for that thing if found.
|
static ClasspathInventory |
getInstance()
Create and/or return an instance that uses it's own classloader to initialize all classpath entries.
|
List<String> |
getPackageInventory(String pkgdirname)
This scans the entire known classpath and constructs all stuff that is available in the
specified package directory.
|
static void |
main(String[] args) |
public static ClasspathInventory create(URL[] urls)
urls - public static ClasspathInventory create(ClassLoader cl)
cl - public static ClasspathInventory getInstance()
public IModifyableResource findResourceSource(String resourcePath)
resourcePath - Absolute resource pathname, preferably without leading /URISyntaxExceptionpublic IModifyableResource findClassSource(Class<?> clz)
clz - URISyntaxException@Nonnull public List<String> getPackageInventory(@Nonnull String pkgdirname)
pkgdirname - public static void main(String[] args)
Copyright © 2017 etc.to. All rights reserved.