|
InterfaceClassFinder V1.0 by Matthew Ford 2009/01/06 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectau.com.forward.interfaceClassFinder.FindInterfaceClasses
public class FindInterfaceClasses
This class finds all classes that implement a given interface and returns the class names as a list.
Java libraries are not scanned. Only the classes and jars on the class path are scanned.
Field Summary | |
---|---|
static java.lang.String |
newline
|
Constructor Summary | |
---|---|
FindInterfaceClasses()
|
Method Summary | |
---|---|
static java.util.List<java.lang.String> |
findClassNames(java.lang.Class interfaceClass)
Scans the classpath and returns a list of fully qualified class names that implement the given interface class. Only classes which implement the interface and have a no-arg public constructor are returned. The interface can be implemented by a super class or the class can implement an interface that extends the given one. |
static java.util.List<java.lang.String> |
getClassNames(java.lang.Class interfaceClass)
Having called findClassNames() once you can then call this method with another interface class to find the classes that implement that interface. |
static void |
main(java.lang.String[] args)
Find the classes that implement the give fully qualified class and which have no-arg public constructors. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String newline
Constructor Detail |
---|
public FindInterfaceClasses()
Method Detail |
---|
public static java.util.List<java.lang.String> findClassNames(java.lang.Class interfaceClass)
interfaceClass
- the interface class to look for
public static java.util.List<java.lang.String> getClassNames(java.lang.Class interfaceClass)
interfaceClass
- the interface the classes must implement.
public static void main(java.lang.String[] args)
args
- the full qualified interface class name, must exist in the class.
|
©2003-2009, Forward Computing and Control Pty. Ltd ACN 003 669 994 NSW Australia All Rights Reserved. |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |