Class Selector.ClassConditions

  • Enclosing class:
    Selector

    public static final class Selector.ClassConditions
    extends Object
    Conditions for selecting a class.
    • Method Detail

      • annotatedWith

        public static Predicate<Class> annotatedWith​(Class<? extends Annotation> annotationClass)
        Builds a predicate to check if the class is annotated.
        Parameters:
        annotationClass - the annotation
        Returns:
        the predicate
      • subTypeOf

        public static Predicate<Class> subTypeOf​(Class clazz)
        Builds a predicate to check if the class is a subtype of the given class.
        Parameters:
        clazz - the annotation
        Returns:
        the predicate
      • isAbstract

        public static Predicate<Class> isAbstract()
        Builds a predicate to check if the class is an abstract class. (we consider here that interface class are not abstract classes) To filter interface clazz use the interfaces() ClassCondition
        Returns:
        the predicate
      • interfaces

        public static Predicate<Class> interfaces()
        Builds a predicate to check if the class is an interface.
        Returns:
        the predicate