uwaga nie dziala
This commit is contained in:
1 parent
a733249665
commit
1e281381f2
8 files changed
+232
-4
No files matched your search
@@ -0,0 +1,33 @@
|
||||
package application;
|
||||
|
||||
import application.events.EventObject;
|
||||
import org.reflections.Reflections;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Created by lukasgol on 01.02.15.
|
||||
*/
|
||||
public class ClassFinder {
|
||||
private static ClassFinder ourInstance = new ClassFinder();
|
||||
|
||||
public static ClassFinder getInstance() {
|
||||
return ourInstance;
|
||||
}
|
||||
|
||||
private ClassFinder() {
|
||||
}
|
||||
|
||||
public static void main(String[] args
|
||||
) throws IllegalAccessException, InstantiationException {
|
||||
System.out.println("Class Finder started...");
|
||||
Reflections reflections = new Reflections("application");
|
||||
Set<Class<? extends EventObject>> classes = reflections.getSubTypesOf(EventObject.class);
|
||||
for (Class<? extends EventObject> c : classes) {
|
||||
EventObject obj=c.newInstance();
|
||||
System.out.println(c);
|
||||
}
|
||||
System.out.println("Class Finder stoped");
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user