Class ReflectionUtil
java.lang.Object
dev.projectenhanced.enhancedjda.util.ReflectionUtil
Util to get classes from package
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAllClassesInPackage
(Class<?> mainClazz, String packageName) This method returns all classes in the specified package.getAllClassesInPackage
(Class<?> mainClazz, String packageName, Class<?> abstractClass) This method returns all classes that extends specified class in specified package
-
Constructor Details
-
ReflectionUtil
public ReflectionUtil()
-
-
Method Details
-
getAllClassesInPackage
This method returns all classes in the specified package.- Parameters:
mainClazz
- The main class of the application.packageName
- Name of the package containing the classes.- Returns:
- Set of classes in the package.
-
getAllClassesInPackage
public static Set<Class<?>> getAllClassesInPackage(Class<?> mainClazz, String packageName, Class<?> abstractClass) This method returns all classes that extends specified class in specified package- Parameters:
packageName
- Name of package that have this classesabstractClass
- Class that need to be extended- Returns:
- Set of classes in package
-