|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.oberon.util.ClassScope
public class ClassScope
A simple static API for listing classes loaded in a JVM. Based on
Field Summary | |
---|---|
static java.lang.String[] |
filterPackages
|
Method Summary | |
---|---|
static java.util.List<java.io.File> |
getAllFilesInDirEndingWithIgnoreCases(java.io.File dir,
java.lang.String endLow)
|
static java.lang.ClassLoader[] |
getCallerClassLoaderTree()
Returns the class loader set "relevant" to the calling class, as described in the article. |
static java.net.URL |
getClassLocation(java.lang.Class<?> cls)
Given a Class |
static java.util.List<java.lang.String> |
getClassNamesInPackage(java.lang.String jarName,
java.lang.String packageName)
|
static java.lang.String[] |
getClassPathClasses(java.lang.String[] filterclasses)
|
java.util.List<java.io.File> |
getJavaAPISources()
|
static java.lang.Class<?>[] |
getLoadedClasses(java.lang.ClassLoader[] loaders,
java.lang.String[] filterclasses)
A convenience multi-loader version of getLoadedClasses(ClassLoader,String[]) . |
static java.lang.Class<?>[] |
getLoadedClasses(java.lang.ClassLoader loader,
java.lang.String[] filterclasses)
Given a class loader instance, returns all classes currently loaded by that class loader. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String[] filterPackages
Method Detail |
---|
public static java.lang.Class<?>[] getLoadedClasses(java.lang.ClassLoader loader, java.lang.String[] filterclasses)
loader
- defining class loader to inspect [may not be null]
java.lang.RuntimeException
- if the "classes" field hack is not possible in this JREpublic static java.lang.String[] getClassPathClasses(java.lang.String[] filterclasses)
public static java.lang.Class<?>[] getLoadedClasses(java.lang.ClassLoader[] loaders, java.lang.String[] filterclasses)
getLoadedClasses(ClassLoader,String[])
.
loaders
- an array of defining class loaders to inspect [may not be null]
java.lang.RuntimeException
- if the "classes" field hack is not possible in this JREpublic static java.lang.ClassLoader[] getCallerClassLoaderTree()
java.lang.RuntimeException
- if the caller context resolver could not be instantiatedpublic static java.net.URL getClassLocation(java.lang.Class<?> cls)
public java.util.List<java.io.File> getJavaAPISources()
public static java.util.List<java.io.File> getAllFilesInDirEndingWithIgnoreCases(java.io.File dir, java.lang.String endLow)
public static java.util.List<java.lang.String> getClassNamesInPackage(java.lang.String jarName, java.lang.String packageName)
|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |