Class ServiceMatcherSugar



  • public class ServiceMatcherSugar
    extends java.lang.Object
    Declarative syntactic sugar which may be statically imported in order to allow declarative definitions for the ServiceMatcher related elements.
    • Constructor Detail

      • ServiceMatcherSugar

        public ServiceMatcherSugar​()
    • Method Detail

      • isAssignableFrom

        public static <S extends Service<?>> ServiceMatcher<S> isAssignableFrom​(java.lang.Class<?> aServiceType)
        Factory method to create an service matcher by service type.
        Type Parameters:
        S - The type of the service to be matched
        Parameters:
        aServiceType - The service type to be matched by this matcher.
        Returns:
        An service matcher by service type.
      • or

        @SafeVarargs
        public static <S extends Service<?>> ServiceMatcher<S> or​(ServiceMatcher<S>... aServiceMatchers)
        Factory method to create an "OR" matcher for the given matchers.
        Type Parameters:
        S - The type of the service applied to the matcher
        Parameters:
        aServiceMatchers - The matchers to be combined by an "OR".
        Returns:
        An "OR" matcher.
      • and

        @SafeVarargs
        public static <S extends Service<?>> ServiceMatcher<S> and​(ServiceMatcher<S>... aServiceMatchers)
        Factory method to create an "AND" matcher for the given matchers.
        Type Parameters:
        S - The type of the service applied to the matcher
        Parameters:
        aServiceMatchers - The matchers to be combined by an "AND".
        Returns:
        An "AND" matcher.