Top Description Inners Fields Constructors Methods
com.google.inject.matcher

public Class Matchers

extends Object
Class Inheritance
Static Imports
com.google.common.base.Preconditions.checkArgument, .Preconditions.checkNotNull

Matcher implementations. Supports matching classes and methods.
Author
[email protected] (Bob Lee)

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
Matchers.AndMatcher<T>

Deprecated as a consequence of AbstractMatcher being deprecated.
private static class
Matchers.AnnotatedWith

Deprecated as a consequence of AbstractMatcher being deprecated.
private static class
Matchers.AnnotatedWithType

Deprecated as a consequence of AbstractMatcher being deprecated.
private static class
Matchers.Any

Deprecated as a consequence of AbstractMatcher being deprecated.
private static class
Matchers.IdenticalTo

Deprecated as a consequence of AbstractMatcher being deprecated.
private static class
Matchers.InPackage

Deprecated as a consequence of AbstractMatcher being deprecated.
private static class
Matchers.InSubpackage

Deprecated as a consequence of AbstractMatcher being deprecated.
private static class
Matchers.Not<T>

Deprecated as a consequence of AbstractMatcher being deprecated.
private static class
Matchers.Only

Deprecated as a consequence of AbstractMatcher being deprecated.
pack-priv static class
Matchers.OrMatcher<T>

Deprecated as a consequence of AbstractMatcher being deprecated.
private static class
Matchers.Returns

Deprecated as a consequence of AbstractMatcher being deprecated.
private static class
Matchers.SubclassesOf

Deprecated as a consequence of AbstractMatcher being deprecated.

Field Summary

Modifier and TypeField and Description
private static final Matcher<Object>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Matcher<AnnotatedElement>
annotatedWith(final Class<? extends Annotation> annotationType)

Returns a matcher which matches elements (methods, classes, etc.) with a given annotation.

public static Matcher<AnnotatedElement>
annotatedWith(final Annotation annotation)

Returns a matcher which matches elements (methods, classes, etc.) with a given annotation.

public static Matcher<Object>
any()

Returns a matcher which matches any input.

private static void
checkForRuntimeRetention(Class<? extends Annotation> annotationType)

public static Matcher<Object>
identicalTo(final Object value)

Returns a matcher which matches only the given object.

public static Matcher<Class<T>>
inPackage(final Package targetPackage)

Returns a matcher which matches classes in the given package.

public static Matcher<Class<T>>
inSubpackage(final String targetPackageName)

Returns a matcher which matches classes in the given package and its subpackages.

public static <T> Matcher<T>
not(final Matcher<? super T> p)

Inverts the given matcher.

public static Matcher<Object>
only(Object value)

Returns a matcher which matches objects equal to the given object.

public static Matcher<Method>
returns(final Matcher<? super Class<?>> returnType)

Returns a matcher which matches methods with matching return types.

public static Matcher<Class<T>>
subclassesOf(final Class<?> superclass)

Returns a matcher which matches subclasses of the given type (as well as the given type).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait