Class ClassChecker


  • public class ClassChecker
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ClassChecker​(java.lang.String... classNames)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accepts​(java.lang.Object object)  
      int getMask​(java.lang.Object object)
      If the object is an instance of a class at index N in the list passed to the constructor, N-th bit will be set in the returned mask.
      boolean isAssignableFrom​(java.lang.Class<?> aClass)  
      boolean rejects​(java.lang.Object object)
      Utility method.
      • Methods inherited from class java.lang.Object

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

      • ClassChecker

        public ClassChecker​(@NotNull
                            java.lang.String... classNames)
    • Method Detail

      • getMask

        public int getMask​(@Nullable
                           java.lang.Object object)
        If the object is an instance of a class at index N in the list passed to the constructor, N-th bit will be set in the returned mask.
      • isAssignableFrom

        public boolean isAssignableFrom​(@NotNull
                                        java.lang.Class<?> aClass)
      • accepts

        public boolean accepts​(@NotNull
                               java.lang.Object object)
      • rejects

        public boolean rejects​(@NotNull
                               java.lang.Object object)
        Utility method. The same as !accepts(object).