- java.lang.Object
-
- org.refcodes.servicebus.ServiceMatcherSugar
-
public class ServiceMatcherSugar extends Object
Declarative syntactic sugar which may be statically imported in order to allow declarative definitions for theServiceMatcher
related elements.
-
-
Constructor Summary
Constructors Constructor Description ServiceMatcherSugar()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <S extends Service<?>>
ServiceMatcher<S>and(ServiceMatcher<S>... aServiceMatchers)
Factory method to create an "AND" matcher for the given matchers.static <S extends Service<?>>
ServiceMatcher<S>isAssignableFrom(Class<?> aServiceType)
Factory method to create an service matcher by service type.static <S extends Service<?>>
ServiceMatcher<S>or(ServiceMatcher<S>... aServiceMatchers)
Factory method to create an "OR" matcher for the given matchers.
-
-
-
Method Detail
-
isAssignableFrom
public static <S extends Service<?>> ServiceMatcher<S> isAssignableFrom(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.
-
-