|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.domui.util.resources.ClasspathInventory
public class ClasspathInventory
Inventory of all files (.class and other resources) reachable in the classpath. It lazily loads all entries in all directory classpath entries and all .jar entries and caches those as soon as they are needed.
Used in development mode to get timestamps for .class and other files, and the contents of resources.
Method Summary | |
---|---|
static ClasspathInventory |
create(java.lang.ClassLoader cl)
Create an inventory for the specified classloader. |
static ClasspathInventory |
create(java.net.URL[] urls)
Create an inventory on the specified URLs. |
IModifyableResource |
findClassSource(java.lang.Class<?> clz)
Tries to find the .class file for the specified class. |
IModifyableResource |
findResourceSource(java.lang.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. |
java.util.List<java.lang.String> |
getPackageInventory(java.lang.String pkgdirname)
This scans the entire known classpath and constructs all stuff that is available in the specified package directory. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ClasspathInventory create(java.net.URL[] urls)
urls
-
public static ClasspathInventory create(java.lang.ClassLoader cl)
cl
-
public static ClasspathInventory getInstance()
public IModifyableResource findResourceSource(java.lang.String resourcePath)
resourcePath
- Absolute resource pathname, preferably without leading /
java.net.URISyntaxException
public IModifyableResource findClassSource(java.lang.Class<?> clz)
clz
-
java.net.URISyntaxException
@Nonnull public java.util.List<java.lang.String> getPackageInventory(@Nonnull java.lang.String pkgdirname)
pkgdirname
-
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |