From 15f8a1b99d513db940ac9f64de53566b2b4f2b33 Mon Sep 17 00:00:00 2001 From: Jakob Herrmann Date: Wed, 22 Feb 2017 00:04:16 +0100 Subject: [PATCH] PackageCrawler: Convert class names to list of strings. --- src/de/dhbwstuttgart/parser/PackageCrawler.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/de/dhbwstuttgart/parser/PackageCrawler.java b/src/de/dhbwstuttgart/parser/PackageCrawler.java index bef0d6c7..007b4736 100644 --- a/src/de/dhbwstuttgart/parser/PackageCrawler.java +++ b/src/de/dhbwstuttgart/parser/PackageCrawler.java @@ -9,6 +9,7 @@ import org.reflections.util.FilterBuilder; import java.util.LinkedList; import java.util.List; +import java.util.ArrayList; import java.util.Set; /** @@ -32,4 +33,13 @@ public class PackageCrawler { return classes; } + + public static List getClassNames(String packageName){ + List nameList = new ArrayList(); + Set> classes = getClassesInPackage(packageName); + for(Class c : classes){ + nameList.add(c.getName()); + } + return nameList; + } }