Package xyz.dynxsty.dih4jda.util
Class ClassWalker
java.lang.Object
xyz.dynxsty.dih4jda.util.ClassWalker
A class that provides you with the ability to get all classes inside a specific package.
- Since:
- v1.6
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets all classes inside the given package and sub packages.getSubTypesOf(Class<T> type) Gets all classes in the given package and sub packages which extend the specified class.
-
Constructor Details
-
ClassWalker
-
-
Method Details
-
getAllClasses
Gets all classes inside the given package and sub packages.- Returns:
- An unmodifiable
Setof classes inside the given package. - Throws:
DIH4JDAException- Since:
- v1.6
-
getSubTypesOf
@Nonnull public <T> Set<Class<? extends T>> getSubTypesOf(@Nonnull Class<T> type) throws DIH4JDAException Gets all classes in the given package and sub packages which extend the specified class.- Parameters:
type- The parent class to search for.- Returns:
- An unmodifiable
Setof classes which are assignable to the given type. - Throws:
DIH4JDAException- Since:
- v1.6
-