Package org.geysermc.event.bus.impl.util
Class Utils
- java.lang.Object
-
- org.geysermc.event.bus.impl.util.Utils
-
public final class Utils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Set<java.lang.Class<?>>ancestorsThatUse(java.lang.Class<?> clazz, java.lang.Class<?> use)Looks at all the superclasses and superinterfaces of a given class and checks if it is assignable from the given base class.static booleanisEventCancelled(java.lang.Object event)static booleanshouldCallSubscriber(Subscriber<?> subscriber, java.lang.Object event)
-
-
-
Method Detail
-
isEventCancelled
public static boolean isEventCancelled(java.lang.Object event)
-
shouldCallSubscriber
public static boolean shouldCallSubscriber(Subscriber<?> subscriber, java.lang.Object event)
-
ancestorsThatUse
public static java.util.Set<java.lang.Class<?>> ancestorsThatUse(java.lang.Class<?> clazz, java.lang.Class<?> use)Looks at all the superclasses and superinterfaces of a given class and checks if it is assignable from the given base class. Superclasses and superinterfaces of the base class and the base class itself are not included in the result, but the given class is included if a super type is assignable.- Parameters:
clazz- the class to look atuse- the base class
-
-