public final class ClassList extends Object
Copyright (c) 2006 by stoughto! TODO replace this by something that is provably free code.
Modifier and Type | Method and Description |
---|---|
static Collection<Class<?>> |
classList(String packageRoot,
boolean excludeInterfaces)
Return a List of all the classes under a package.
|
static Collection<String> |
getResources(Pattern pattern)
For all elements of java.class.path get a Collection of resources Pattern pattern = Pattern.compile(".*"); gets all
resources.
|
static boolean |
hasNonStaticFields(Class<?> c)
Report if a class has non-static fields.
|
static boolean |
isAnonymousInnerClass(Class<?> c)
Determine if a class is an anonymous inner class.
|
static void |
main(String[] args)
List the resources that match args[0], or a fixed pattern to demonstrate the use of this class.
|
public static Collection<String> getResources(Pattern pattern)
pattern
- the pattern to matchpublic static Collection<Class<?>> classList(String packageRoot, boolean excludeInterfaces)
packageRoot
- String package nameexcludeInterfaces
- boolean; if true; interfaces are excluded from the resultpublic static boolean isAnonymousInnerClass(Class<?> c)
c
- Class; the class to checkpublic static boolean hasNonStaticFields(Class<?> c)
c
- Class<?>; the classpublic static void main(String[] args)
args
- args[0] is the pattern to match, or list all resources matching a built-in pattern if there are no argsCopyright © 2014–2016 Delft University of Technology. All rights reserved.