Interface Matchers
public interface Matchers
Utility interface for constructing common
Matchers-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic Matcherannotation(Class<? extends Annotation> type) Creates aMatcherthat matchesInjectionTargets with the given annotationstatic MatcherexactType(honeyroasted.jype.system.resolver.reflection.JTypeToken<?> token) Creates aMatchertht matchesInjectionTargetwith given type, based on exact type equality.static MatcherexactType(honeyroasted.jype.type.JType type) Creates aMatchertht matchesInjectionTargetwith given type, based on exact type equality.static MatcherCreates aMatchertht matchesInjectionTargetwith given type, based on exact type equality.static MatcherCreates aMatcherthat matchesInjectionTargets by their namesstatic Matchertype(honeyroasted.jype.system.resolver.reflection.JTypeToken<?> token) Creates aMatcherthat matchesInjectionTargets with the given type, based on assignment rules.static Matchertype(honeyroasted.jype.type.JType type) Creates aMatcherthat matchesInjectionTargets with the given type, based on assignment rules.static MatcherCreates aMatcherthat matchesInjectionTargets with the given type, based on assignment rules.
-
Method Details
-
name
Creates aMatcherthat matchesInjectionTargets by their names- Parameters:
name- The name to match- Returns:
- A new
Matcher
-
annotation
Creates aMatcherthat matchesInjectionTargets with the given annotation- Parameters:
type- The annotation type to match- Returns:
- A new
Matcher
-
type
Creates aMatcherthat matchesInjectionTargets with the given type, based on assignment rules. For example, if the given type is Object and the injection target type is Integer, this matcher will return true, since Integer can be assigned to Object. For an exact type match, useexactType(Type).- Parameters:
type- The type to match- Returns:
- A new
Matcher
-
exactType
Creates aMatchertht matchesInjectionTargetwith given type, based on exact type equality. For example, if the given type is Object nd the injection target type is Integer, this matcher will return false, since Integer does not equal Object. For a type match based on assignment rules, usetype(Type).- Parameters:
type- The type to match- Returns:
- A new
Matcher
-
type
Creates aMatcherthat matchesInjectionTargets with the given type, based on assignment rules. For example, if the given type is Object and the given type is Integer, this matcher will return true, since Integer can be assigned to Object. For an exact type match, useexactType(JType).- Parameters:
type- The type to match- Returns:
- A new
Matcher
-
exactType
Creates aMatchertht matchesInjectionTargetwith given type, based on exact type equality. For example, if the given type is Object nd the injection target type is Integer, this matcher will return false, since Integer does not equal Object. For a type match based on assignment rules, usetype(JType).- Parameters:
type- The type to match- Returns:
- A new
Matcher
-
type
Creates aMatcherthat matchesInjectionTargets with the given type, based on assignment rules. For example, if the given type is Object and the given type is Integer, this matcher will return true, since Integer can be assigned to Object. For an exact type match, useexactType(JTypeToken).- Parameters:
token- The type to match- Returns:
- A new
Matcher
-
exactType
Creates aMatchertht matchesInjectionTargetwith given type, based on exact type equality. For example, if the given type is Object nd the injection target type is Integer, this matcher will return false, since Integer does not equal Object. For a type match based on assignment rules, usetype(JTypeToken).- Parameters:
token- The type to match- Returns:
- A new
Matcher
-