bpiwowar.argparser.utils
Class Introspection
java.lang.Object
bpiwowar.argparser.utils.Introspection
public class Introspection
- extends Object
Methods used for introspection
- Author:
- B. Piwowarski
Field Summary |
static org.apache.log4j.Logger |
logger
|
Method Summary |
static void |
addClasses(Introspection.Checker checker,
ArrayList<Class<?>> list,
int levels,
JarURLConnection conn,
String prefix)
|
static void |
addClasses(Introspection.Checker checker,
ArrayList<Class<?>> list,
String packageName,
int levels)
Add classes to the list |
static void |
addClasses(Introspection.Checker checker,
ArrayList<Class<?>> list,
String packageName,
int levels,
File directory)
|
static void |
addClasses(Introspection.Checker checker,
ArrayList<Class<?>> list,
String packageName,
int levels,
URL url)
|
static void |
addImplementors(ArrayList<Class<?>> list,
Class<?> which,
String packageName,
int levels)
|
static ArrayList<Class<?>> |
getClasses(Introspection.Checker checker,
String packageName,
int levels)
|
static Class<?>[] |
getImplementors(Class<?> which,
String packageName,
int levels)
Get the list of class which implement a given class |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
public static org.apache.log4j.Logger logger
Introspection
public Introspection()
getImplementors
public static Class<?>[] getImplementors(Class<?> which,
String packageName,
int levels)
- Get the list of class which implement a given class
- Parameters:
which
- The base classpackageName
- the package where classes are searchedlevels
- number of levels to be explored (-1 for infinity)
- Returns:
- an array of objects of the given class
addImplementors
public static void addImplementors(ArrayList<Class<?>> list,
Class<?> which,
String packageName,
int levels)
getClasses
public static ArrayList<Class<?>> getClasses(Introspection.Checker checker,
String packageName,
int levels)
addClasses
public static void addClasses(Introspection.Checker checker,
ArrayList<Class<?>> list,
String packageName,
int levels)
- Add classes to the list
- Parameters:
checker
- Used to filter the classeslist
- The list to fillpackageName
- The package to be analyzedlevels
- The maximum number of recursion within the structure (or -1 if
infinite)
addClasses
public static void addClasses(Introspection.Checker checker,
ArrayList<Class<?>> list,
String packageName,
int levels,
URL url)
- Parameters:
checker
- list
- packageName
- levels
- url
-
addClasses
public static void addClasses(Introspection.Checker checker,
ArrayList<Class<?>> list,
int levels,
JarURLConnection conn,
String prefix)
throws IOException
- Parameters:
checker
- list
- levels
- conn
- prefix
-
- Throws:
IOException
addClasses
public static void addClasses(Introspection.Checker checker,
ArrayList<Class<?>> list,
String packageName,
int levels,
File directory)
- Parameters:
checker
- list
- packageName
- levels
- directory
-
Copyright © 2013. All Rights Reserved.