Class 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 boolean isEventCancelled​(java.lang.Object event)  
      static boolean shouldCallSubscriber​(Subscriber<?> subscriber, java.lang.Object event)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Utils

        public Utils()
    • 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 at
        use - the base class