Class HandlerTypePredicate

  • All Implemented Interfaces:
    Predicate<Class<?>>

    public final class HandlerTypePredicate
    extends Object
    implements Predicate<Class<?>>
    A Predicate to match request handling component types if any of the following selectors match:
    • Base packages -- for selecting handlers by their package.
    • Assignable types -- for selecting handlers by super type.
    • Annotations -- for selecting handlers annotated in a specific way.

    Composability methods on Predicate can be used :

     Predicate<Class<?>> predicate =
                    HandlerTypePredicate.forAnnotation(RestController.class)
                                    .and(HandlerTypePredicate.forBasePackage("org.example"));
     
    Since:
    5.1
    Author:
    Rossen Stoyanchev