forked from JavaTX/JavaCompilerCore
PackageCrawler: Convert class names to list of strings.
This commit is contained in:
parent
72bf03ec58
commit
15f8a1b99d
@ -9,6 +9,7 @@ import org.reflections.util.FilterBuilder;
|
|||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -32,4 +33,13 @@ public class PackageCrawler {
|
|||||||
|
|
||||||
return classes;
|
return classes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<String> getClassNames(String packageName){
|
||||||
|
List<String> nameList = new ArrayList();
|
||||||
|
Set<Class<?>> classes = getClassesInPackage(packageName);
|
||||||
|
for(Class c : classes){
|
||||||
|
nameList.add(c.getName());
|
||||||
|
}
|
||||||
|
return nameList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user