Package xyz.srnyx.annoyingapi
Class AnnoyingReflections
- java.lang.Object
-
- xyz.srnyx.annoyingapi.AnnoyingReflections
-
- All Implemented Interfaces:
org.reflections.util.NameHelper
public class AnnoyingReflections extends java.lang.Object implements org.reflections.util.NameHelperThis class is a modified version ofReflectionsused for automaticRegistrableinAnnoyingPluginOnly made this to avoid a logger being created which caused an irrelevant error to be logged on start-up
It has the added bonus of less logic which makes it about 7x faster (about 46ms faster with 2 packages, 19 total classes)
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAnnoyingReflections()Constructs a new instance ofAnnoyingReflections
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> @NotNull java.util.Set<java.lang.Class<? extends T>>getSubTypesOf(@NotNull java.util.Set<java.lang.String> packages, @NotNull java.lang.Class<T> type)Get all classes that are assignable to the given type
-
-
-
Constructor Detail
-
AnnoyingReflections
protected AnnoyingReflections()
Constructs a new instance ofAnnoyingReflections
-
-
Method Detail
-
getSubTypesOf
@NotNull public static <T> @NotNull java.util.Set<java.lang.Class<? extends T>> getSubTypesOf(@NotNull @NotNull java.util.Set<java.lang.String> packages, @NotNull @NotNull java.lang.Class<T> type)Get all classes that are assignable to the given type- Type Parameters:
T- the type to check- Parameters:
packages- the packages to scantype- the type to check- Returns:
- a set of classes that are assignable to the given type
-
-