Package | Description |
---|---|
net.bytebuddy.matcher |
Contains an API for matching Java byte code entities.
|
Modifier and Type | Class and Description |
---|---|
class |
AnnotationTypeMatcher<T extends AnnotationDescription>
An element matcher that matches the type of an annotation description.
|
class |
BooleanMatcher<T>
An element matcher that returns a fixed result.
|
class |
CollectionItemMatcher<T>
A list item matcher matches any element of a collection to a given matcher and assures that at least one
element matches the supplied iterable condition.
|
class |
CollectionOneToOneMatcher<T>
An element matcher that matches a given iterable collection to a list of matchers on a per-element basis.
|
class |
CollectionRawTypeMatcher<T extends Iterable<? extends GenericTypeDescription>>
An element matcher that matches a collection of types by their raw types.
|
class |
CollectionSizeMatcher<T extends Iterable<?>>
An element matcher that matches a collection by its size.
|
class |
DeclaringAnnotationMatcher<T extends AnnotatedCodeElement>
An element matcher that matches the list of annotations that are provided by an annotated element.
|
class |
DeclaringFieldMatcher<T extends GenericTypeDescription>
An element matcher that checks if a type description declares fields of a given property.
|
class |
DeclaringMethodMatcher<T extends GenericTypeDescription>
An element matcher that checks if a type description declares methods of a given property.
|
class |
DeclaringTypeMatcher<T extends DeclaredByType>
An element matcher that matches the declaring type of another element, only if this element is actually declared
in a type.
|
class |
DefinedShapeMatcher<T extends ByteCodeElement.TypeDependant<S,?>,S extends ByteCodeElement.TypeDependant<?,?>>
An element matcher that matches a byte code's element's token against a matcher for such a token.
|
class |
DescriptorMatcher<T extends ByteCodeElement>
An element matcher that matches a Java descriptor.
|
static class |
ElementMatcher.Junction.AbstractBase<V>
A base implementation of
ElementMatcher.Junction . |
static class |
ElementMatcher.Junction.Conjunction<W>
A conjunction matcher which only matches an element if both represented matchers constitute a match.
|
static class |
ElementMatcher.Junction.Disjunction<W>
A disjunction matcher which only matches an element if both represented matchers constitute a match.
|
class |
EqualityMatcher<T>
An element matcher that checks an object's equality to another object.
|
class |
FieldTypeMatcher<T extends FieldDescription>
An element matcher that matches a field's type.
|
class |
InheritedAnnotationMatcher<T extends TypeDescription>
An element matcher that matches the list of inherited annotations of a type description.
|
class |
MethodExceptionTypeMatcher<T extends MethodDescription>
An element matcher that matches the exceptions that are declared by a method.
|
class |
MethodParametersMatcher<T extends MethodDescription>
An element matcher that matches a method's parameters.
|
class |
MethodParameterTypeMatcher<T extends ParameterDescription>
An element matcher that matches a method's parameter's type.
|
class |
MethodParameterTypesMatcher<T extends ParameterList<?>>
An element matcher that matches a method's parameter types.
|
class |
MethodReturnTypeMatcher<T extends MethodDescription>
An element matcher that matches its argument's return type against a given type matcher.
|
class |
MethodSortMatcher<T extends MethodDescription>
Matches a method description by its general characteristics which are represented as a
MethodSortMatcher.Sort . |
class |
ModifierMatcher<T extends ModifierReviewable>
An element matcher that matches a byte code element by its modifiers.
|
class |
NameMatcher<T extends NamedElement>
A method matcher that matches a byte code element's source code name:
The source code name of types is equal to their binary name where arrays are appended a
[] by
their arity and where inner classes are appended by dots to their outer class's source name.
Constructors and the type initializer methods are represented by the empty string as they do not
represent a source code name.
Fields are named as in the source code.
|
class |
NegatingMatcher<T>
An element matcher that reverses the matching result of another matcher.
|
class |
NullMatcher<T>
An element matcher that matches the
null value. |
class |
RawTypeMatcher<T extends GenericTypeDescription>
An element matcher that matches its argument's
GenericTypeDescription raw type against the
given matcher for a TypeDescription . |
class |
StringMatcher
An element matcher that compares two strings by a given pattern which is characterized by a
StringMatcher.Mode . |
class |
SubTypeMatcher<T extends TypeDescription>
An element matcher that matches its argument for being another type's subtype.
|
class |
SuperTypeMatcher<T extends TypeDescription>
An element matcher that matches its argument for being another type's super type.
|
class |
TokenMatcher<T extends ByteCodeElement.TypeDependant<?,S>,S extends ByteCodeElement.Token<S>>
An element matcher that matches a byte code's element's token against a matcher for such a token.
|
class |
TypeSortMatcher<T extends GenericTypeDescription>
An element matcher that validates that a given generic type description represents a type of a given name.
|
class |
VisibilityMatcher<T extends ByteCodeElement>
An element matcher that validates that a given byte code element is visible to a given type.
|
Modifier and Type | Method and Description |
---|---|
<U extends S> |
ElementMatcher.Junction.and(ElementMatcher<? super U> other)
Creates a conjunction where this matcher and the
other matcher must both be matched in order
to constitute a successful match. |
<U extends V> |
ElementMatcher.Junction.AbstractBase.and(ElementMatcher<? super U> other) |
static <T> ElementMatcher.Junction<T> |
ElementMatchers.any()
Creates a matcher that always returns
true . |
static <T extends AnnotationDescription> |
ElementMatchers.anyOf(Annotation... value)
Creates a matcher that matches any of the given annotations as
AnnotationDescription s
by the Object.equals(Object) method. |
static <T extends MethodDescription> |
ElementMatchers.anyOf(Constructor<?>... value)
Creates a matcher that matches any of the given constructors as
MethodDescription s
by the Object.equals(Object) method. |
static <T extends FieldDescription> |
ElementMatchers.anyOf(Field... value)
Creates a matcher that matches any of the given fields as
FieldDescription s
by the Object.equals(Object) method. |
static <T> ElementMatcher.Junction<T> |
ElementMatchers.anyOf(Iterable<?> values)
Creates a matcher that matches any of the given objects by the
Object.equals(Object) method. |
static <T extends MethodDescription> |
ElementMatchers.anyOf(Method... value)
Creates a matcher that matches any of the given methods as
MethodDescription s
by the Object.equals(Object) method. |
static <T> ElementMatcher.Junction<T> |
ElementMatchers.anyOf(Object... value)
Creates a matcher that matches any of the given objects by the
Object.equals(Object) method. |
static <T extends GenericTypeDescription> |
ElementMatchers.anyOf(Type... value)
Creates a matcher that matches any of the given types as
TypeDescription s
by the Object.equals(Object) method. |
static <T extends MethodDescription> |
ElementMatchers.canThrow(Class<? extends Throwable> exceptionType)
Matches a
MethodDescription by its capability to throw a given
checked exception. |
static <T extends MethodDescription> |
ElementMatchers.canThrow(TypeDescription exceptionType)
Matches a
MethodDescription by its capability to throw a given
checked exception. |
static <T extends AnnotatedCodeElement> |
ElementMatchers.declaresAnnotation(ElementMatcher<? super AnnotationDescription> matcher)
Matches an
AnnotatedCodeElement to declare any annotation
that matches the given matcher. |
static <T extends MethodDescription> |
ElementMatchers.declaresException(Class<? extends Throwable> exceptionType)
Matches a method that declares the given generic exception type as a (erased) exception type.
|
static <T extends MethodDescription> |
ElementMatchers.declaresException(TypeDescription exceptionType)
Matches a method that declares the given generic exception type as a (erased) exception type.
|
static <T extends GenericTypeDescription> |
ElementMatchers.declaresField(ElementMatcher<? super FieldDescription> fieldMatcher)
Matches a type by a another matcher that is applied on any of its declared fields.
|
static <T extends MethodDescription> |
ElementMatchers.declaresGenericException(ElementMatcher<? super Iterable<? extends GenericTypeDescription>> exceptionMatcher)
Matches a method's generic exception types against the provided matcher.
|
static <T extends MethodDescription> |
ElementMatchers.declaresGenericException(GenericTypeDescription exceptionType)
Matches a method that declares the given generic exception type.
|
static <T extends MethodDescription> |
ElementMatchers.declaresGenericException(Type exceptionType)
Matches a method that declares the given generic exception type.
|
static <T extends GenericTypeDescription> |
ElementMatchers.declaresMethod(ElementMatcher<? super MethodDescription> methodMatcher)
Matches a type by a another matcher that is applied on any of its declared methods.
|
static <T extends FieldDescription> |
ElementMatchers.definedField(ElementMatcher<? super FieldDescription.InDefinedShape> matcher)
Matches a field in its defined shape.
|
static <T extends MethodDescription> |
ElementMatchers.definedMethod(ElementMatcher<? super MethodDescription.InDefinedShape> matcher)
Matches a method in its defined shape.
|
static <T extends ParameterDescription> |
ElementMatchers.definedParameter(ElementMatcher<? super ParameterDescription.InDefinedShape> matcher)
Matches a parameter in its defined shape.
|
static <T extends FieldDescription> |
ElementMatchers.fieldRepresentedBy(ElementMatcher<? super FieldDescription.Token> matcher)
Matches a field by a token matcher.
|
static <T extends FieldDescription> |
ElementMatchers.fieldType(Class<?> fieldType)
Matches a field's raw type against the provided matcher.
|
static <T extends FieldDescription> |
ElementMatchers.fieldType(ElementMatcher<? super GenericTypeDescription> matcher)
Matches a field's raw type against the provided matcher.
|
static <T extends FieldDescription> |
ElementMatchers.fieldType(TypeDescription fieldType)
Matches a field's raw type against the provided matcher.
|
static <T extends FieldDescription> |
ElementMatchers.genericFieldType(ElementMatcher<? super GenericTypeDescription> matcher)
Matches a field's generic type against the provided matcher.
|
static <T extends FieldDescription> |
ElementMatchers.genericFieldType(GenericTypeDescription fieldType)
Matches a field's generic type against the provided matcher.
|
static <T extends FieldDescription> |
ElementMatchers.genericFieldType(Type fieldType)
Matches a field's generic type against the provided matcher.
|
static <T extends TypeDescription> |
ElementMatchers.hasAnnotation(ElementMatcher<? super AnnotationDescription> matcher)
Matches a list of annotations by a given matcher on a type that declared these annotations or inherited them
from its super classes.
|
static <T extends ByteCodeElement> |
ElementMatchers.hasDescriptor(String descriptor)
Matches a
ByteCodeElement 's descriptor against a given value. |
static <T extends ParameterDescription> |
ElementMatchers.hasGenericType(ElementMatcher<? super GenericTypeDescription> matcher)
Matches a method parameter by its generic type.
|
static <T extends MethodDescription> |
ElementMatchers.hasMethodName(String internalName)
Matches a method against its internal name such that constructors and type initializers are matched appropriately.
|
static <T extends MethodDescription> |
ElementMatchers.hasParameters(ElementMatcher<? super Iterable<? extends ParameterDescription>> matcher)
Matches a
MethodDescription by validating that its parameters
fulfill a given constraint. |
static <T extends ParameterDescription> |
ElementMatchers.hasType(ElementMatcher<? super TypeDescription> matcher)
Matches a parameter's type by the given matcher.
|
static <T extends TypeDescription> |
ElementMatchers.inheritsAnnotation(Class<?> type)
Matches any annotations by their type on a type that declared these annotations or inherited them from its
super classes.
|
static <T extends TypeDescription> |
ElementMatchers.inheritsAnnotation(ElementMatcher<? super TypeDescription> matcher)
Matches any annotations by a given matcher on a type that declared these annotations or inherited them from its
super classes.
|
static <T extends TypeDescription> |
ElementMatchers.inheritsAnnotation(TypeDescription typeDescription)
Matches any annotations by their type on a type that declared these annotations or inherited them from its
super classes.
|
static <T extends AnnotationDescription> |
ElementMatchers.is(Annotation annotation)
Exactly matches a given annotation as an
AnnotationDescription . |
static <T extends MethodDescription> |
ElementMatchers.is(Constructor<?> constructor)
Exactly matches a given constructor as a
MethodDescription . |
static <T extends FieldDescription> |
ElementMatchers.is(Field field)
Exactly matches a given field as a
FieldDescription . |
static <T extends MethodDescription> |
ElementMatchers.is(Method method)
Exactly matches a given method as a
MethodDescription . |
static <T> ElementMatcher.Junction<T> |
ElementMatchers.is(Object value)
Matches the given value which can also be
null by the Object.equals(Object) method or
by a null-check. |
static <T extends GenericTypeDescription> |
ElementMatchers.is(Type type)
Exactly matches a given type as a
TypeDescription . |
static <T extends ModifierReviewable> |
ElementMatchers.isAbstract()
Matches a
ModifierReviewable that is abstract . |
static <T extends AnnotatedCodeElement> |
ElementMatchers.isAnnotatedWith(Class<? extends Annotation> type)
Matches an
AnnotatedCodeElement for declared annotations. |
static <T extends AnnotatedCodeElement> |
ElementMatchers.isAnnotatedWith(ElementMatcher<? super TypeDescription> matcher)
Matches an
AnnotatedCodeElement for declared annotations. |
static <T extends AnnotatedCodeElement> |
ElementMatchers.isAnnotatedWith(TypeDescription typeDescription)
Matches an
AnnotatedCodeElement for declared annotations. |
static <T extends MethodDescription> |
ElementMatchers.isBridge()
Matches a
MethodDescription that is a bridge. |
static <T extends MethodDescription> |
ElementMatchers.isClone()
Only matches the
Object.clone() method, also if it was overridden. |
static <T extends MethodDescription> |
ElementMatchers.isConstructor()
Only matches method descriptions that represent a
Constructor . |
static <T extends ByteCodeElement> |
ElementMatchers.isDeclaredBy(Class<?> type)
Matches a
ByteCodeElement for being declared by a given Class . |
static <T extends ByteCodeElement> |
ElementMatchers.isDeclaredBy(ElementMatcher<? super TypeDescription> matcher)
Matches a
ByteCodeElement for being declared by a TypeDescription that is matched by the given matcher. |
static <T extends ByteCodeElement> |
ElementMatchers.isDeclaredBy(TypeDescription type)
Matches a
ByteCodeElement for being declared by a given TypeDescription . |
static <T extends ByteCodeElement> |
ElementMatchers.isDeclaredByGeneric(ElementMatcher<? super GenericTypeDescription> matcher)
Matches a
ByteCodeElement for being declared by a GenericTypeDescription that is matched by the given matcher. |
static <T extends ByteCodeElement> |
ElementMatchers.isDeclaredByGeneric(GenericTypeDescription type)
Matches a
ByteCodeElement for being declared by a given GenericTypeDescription . |
static <T extends ByteCodeElement> |
ElementMatchers.isDeclaredByGeneric(Type type)
Matches a
ByteCodeElement for being declared by a given generic Type . |
static <T extends MethodDescription> |
ElementMatchers.isDefaultConstructor()
Matches a default constructor, i.e.
|
static <T extends MethodDescription> |
ElementMatchers.isDefaultFinalizer()
Only matches the
Object.finalize() method if it was not overridden. |
static <T extends MethodDescription> |
ElementMatchers.isDefaultMethod()
Only matches Java 8 default methods.
|
static <T extends MethodDescription> |
ElementMatchers.isEquals()
Only matches the
Object.equals(Object) method, also if it was overridden. |
static <T extends ModifierReviewable> |
ElementMatchers.isFinal()
Matches a
ModifierReviewable that is final . |
static <T extends MethodDescription> |
ElementMatchers.isFinalizer()
Only matches the
Object.finalize() method, even if it was overridden. |
static <T extends MethodDescription> |
ElementMatchers.isGetter()
Matches any Java bean getter method.
|
static <T extends MethodDescription> |
ElementMatchers.isGetter(ElementMatcher<? super GenericTypeDescription> matcher)
Matches any Java bean getter method which returns an value with a type matches the supplied matcher.
|
static <T extends MethodDescription> |
ElementMatchers.isGetter(GenericTypeDescription typeDescription)
Matches any Java bean getter method which returns the given type.
|
static <T extends MethodDescription> |
ElementMatchers.isGetter(Type type)
Matches any Java bean getter method which returns the given type.
|
static <T extends MethodDescription> |
ElementMatchers.isHashCode()
Only matches the
Object.toString() method, also if it was overridden. |
static <T extends TypeDescription> |
ElementMatchers.isInterface()
Matches a
TypeDescription that is an interface. |
static <T extends MethodDescription> |
ElementMatchers.isMethod()
Only matches method descriptions that represent a
Method . |
static <T extends MethodDescription> |
ElementMatchers.isNative()
Matches a
MethodDescription that is native . |
static <T extends ModifierReviewable> |
ElementMatchers.isPackagePrivate()
Matches a
ModifierReviewable that is package-private. |
static <T extends ModifierReviewable> |
ElementMatchers.isPrivate()
Matches a
ModifierReviewable that is private . |
static <T extends ModifierReviewable> |
ElementMatchers.isProtected()
Matches a
ModifierReviewable that is protected . |
static <T extends ModifierReviewable> |
ElementMatchers.isPublic()
Matches a
ModifierReviewable that is public . |
static <T extends MethodDescription> |
ElementMatchers.isSetter()
Matches any Java bean setter method.
|
static <T extends MethodDescription> |
ElementMatchers.isSetter(ElementMatcher<? super GenericTypeDescription> matcher)
Matches any Java bean setter method which takes an argument that matches the supplied matcher.
|
static <T extends MethodDescription> |
ElementMatchers.isSetter(GenericTypeDescription typeDescription)
Matches any Java bean setter method which takes an argument the given type.
|
static <T extends MethodDescription> |
ElementMatchers.isSetter(Type type)
Matches any Java bean setter method which takes an argument the given type.
|
static <T extends ModifierReviewable> |
ElementMatchers.isStatic()
Matches a
ModifierReviewable that is static . |
static <T extends MethodDescription> |
ElementMatchers.isStrict()
Matches a
MethodDescription that is strictfp . |
static <T extends TypeDescription> |
ElementMatchers.isSubTypeOf(Class<?> type)
Matches any type description that is a subtype of the given type.
|
static <T extends TypeDescription> |
ElementMatchers.isSubTypeOf(TypeDescription typeDescription)
Matches any type description that is a subtype of the given type.
|
static <T extends TypeDescription> |
ElementMatchers.isSuperTypeOf(Class<?> type)
Matches any type description that is a super type of the given type.
|
static <T extends TypeDescription> |
ElementMatchers.isSuperTypeOf(TypeDescription typeDescription)
Matches any type description that is a super type of the given type.
|
static <T extends MethodDescription> |
ElementMatchers.isSynchronized()
Matches a
MethodDescription that is synchronized . |
static <T extends ModifierReviewable> |
ElementMatchers.isSynthetic()
Matches a
ModifierReviewable that is synthetic. |
static <T extends MethodDescription> |
ElementMatchers.isToString()
Only matches the
Object.toString() method, also if it was overridden. |
static <T extends MethodDescription> |
ElementMatchers.isTypeInitializer()
Only matches method descriptions that represent a
Class type initializer. |
static <T extends MethodDescription> |
ElementMatchers.isVarArgs()
Matches a
MethodDescription that is a var-args. |
static <T extends MethodDescription> |
ElementMatchers.isVirtual()
Matches any method that is virtual, i.e.
|
static <T extends ByteCodeElement> |
ElementMatchers.isVisibleTo(Class<?> type)
Matches a
ByteCodeElement that is visible to a given Class . |
static <T extends ByteCodeElement> |
ElementMatchers.isVisibleTo(TypeDescription typeDescription)
Matches a
ByteCodeElement that is visible to a given
TypeDescription . |
static <T extends MethodDescription> |
ElementMatchers.methodRepresentedBy(ElementMatcher<? super MethodDescription.Token> matcher)
Matches a method by a token matcher.
|
static <T extends NamedElement> |
ElementMatchers.nameContains(String infix)
Matches a
NamedElement for an infix of its name. |
static <T extends NamedElement> |
ElementMatchers.nameContainsIgnoreCase(String infix)
Matches a
NamedElement for an infix of its name. |
static <T extends NamedElement> |
ElementMatchers.named(String name)
Matches a
NamedElement for its exact name. |
static <T extends NamedElement> |
ElementMatchers.namedIgnoreCase(String name)
Matches a
NamedElement for its name. |
static <T extends NamedElement> |
ElementMatchers.nameEndsWith(String suffix)
Matches a
NamedElement for its name's suffix. |
static <T extends NamedElement> |
ElementMatchers.nameEndsWithIgnoreCase(String suffix)
Matches a
NamedElement for its name's suffix. |
static <T extends NamedElement> |
ElementMatchers.nameMatches(String regex)
Matches a
NamedElement name against a regular expression. |
static <T extends NamedElement> |
ElementMatchers.nameStartsWith(String prefix)
Matches a
NamedElement for its name's prefix. |
static <T extends NamedElement> |
ElementMatchers.nameStartsWithIgnoreCase(String prefix)
Matches a
NamedElement for its name's prefix. |
static <T> ElementMatcher.Junction<T> |
ElementMatchers.none()
Creates a matcher that always returns
false . |
static <T extends AnnotationDescription> |
ElementMatchers.noneOf(Annotation... value)
Creates a matcher that matches none of the given annotations as
AnnotationDescription s
by the Object.equals(Object) method. |
static <T extends MethodDescription> |
ElementMatchers.noneOf(Constructor<?>... value)
Creates a matcher that matches none of the given constructors as
MethodDescription s
by the Object.equals(Object) method. |
static <T extends FieldDescription> |
ElementMatchers.noneOf(Field... value)
Creates a matcher that matches none of the given methods as
FieldDescription s
by the Object.equals(Object) method. |
static <T> ElementMatcher.Junction<T> |
ElementMatchers.noneOf(Iterable<?> values)
Creates a matcher that matches none of the given objects by the
Object.equals(Object) method. |
static <T extends MethodDescription> |
ElementMatchers.noneOf(Method... value)
Creates a matcher that matches none of the given methods as
MethodDescription s
by the Object.equals(Object) method. |
static <T> ElementMatcher.Junction<T> |
ElementMatchers.noneOf(Object... value)
Creates a matcher that matches none of the given objects by the
Object.equals(Object) method. |
static <T extends GenericTypeDescription> |
ElementMatchers.noneOf(Type... value)
Creates a matcher that matches none of the given types as
TypeDescription s
by the Object.equals(Object) method. |
static <T> ElementMatcher.Junction<T> |
ElementMatchers.not(ElementMatcher<? super T> matcher)
Inverts another matcher.
|
static <T extends GenericTypeDescription> |
ElementMatchers.ofSort(ElementMatcher<? super GenericTypeDescription.Sort> matcher)
Matches generic type descriptions of the given sort.
|
static <T extends GenericTypeDescription> |
ElementMatchers.ofSort(GenericTypeDescription.Sort sort)
Matches generic type descriptions of the given sort.
|
<U extends S> |
ElementMatcher.Junction.or(ElementMatcher<? super U> other)
Creates a disjunction where either this matcher or the
other matcher must be matched in order
to constitute a successful match. |
<U extends V> |
ElementMatcher.Junction.AbstractBase.or(ElementMatcher<? super U> other) |
static <T extends ParameterDescription> |
ElementMatchers.parameterRepresentedBy(ElementMatcher<? super ParameterDescription.Token> matcher)
Matches a parameter by a token matcher.
|
static <T extends GenericTypeDescription> |
ElementMatchers.rawType(Class<?> type)
Matches a generic type's raw type against the provided raw type.
|
static <T extends GenericTypeDescription> |
ElementMatchers.rawType(ElementMatcher<? super TypeDescription> matcher)
Converts a matcher for a type description into a matcher for a raw type of the matched generic type against the given matcher.
|
static <T extends GenericTypeDescription> |
ElementMatchers.rawType(TypeDescription typeDescription)
Matches a generic type's raw type against the provided raw type.
|
static <T extends Iterable<? extends GenericTypeDescription>> |
ElementMatchers.rawTypes(Class<?>... type)
Matches an iteration of generic types' erasures against the provided raw types.
|
static <T extends Iterable<? extends GenericTypeDescription>> |
ElementMatchers.rawTypes(ElementMatcher<? super Iterable<? extends TypeDescription>> matcher)
Applies the provided matcher to an iteration og generic types' generic types.
|
static <T extends Iterable<? extends GenericTypeDescription>> |
ElementMatchers.rawTypes(Iterable<? extends TypeDescription> typeDescriptions)
Matches an iteration of generic types' erasures against the provided raw types.
|
static <T extends Iterable<? extends GenericTypeDescription>> |
ElementMatchers.rawTypes(TypeDescription... typeDescription)
Matches an iteration of generic types' erasures against the provided raw types.
|
static <T extends FieldDescription> |
ElementMatchers.representedBy(FieldDescription.Token fieldToken)
Validates if a method is represented by the provided field token.
|
static <T extends MethodDescription> |
ElementMatchers.representedBy(MethodDescription.Token methodToken)
Validates if a method is represented by the provided method token.
|
static <T extends ParameterDescription> |
ElementMatchers.representedBy(ParameterDescription.Token parameterToken)
Validates if a method is represented by the provided method token.
|
static <T extends MethodDescription> |
ElementMatchers.returns(Class<?> type)
Matches
MethodDescription s that return a given erasure type. |
static <T extends MethodDescription> |
ElementMatchers.returns(ElementMatcher<? super TypeDescription> matcher)
Matches a method's return type's erasure by the given matcher.
|
static <T extends MethodDescription> |
ElementMatchers.returns(TypeDescription typeDescription)
Matches
MethodDescription s that return a given erasure type. |
static <T extends MethodDescription> |
ElementMatchers.returnsGeneric(ElementMatcher<? super GenericTypeDescription> matcher)
Matches
MethodDescription s that matches a matched method's return type. |
static <T extends MethodDescription> |
ElementMatchers.returnsGeneric(GenericTypeDescription typeDescription)
Matches
MethodDescription s that returns a given
TypeDescription . |
static <T extends MethodDescription> |
ElementMatchers.returnsGeneric(Type type)
Matches
MethodDescription s that return a given generic type. |
static <T extends MethodDescription> |
ElementMatchers.takesArguments(Class<?>... type)
Matches a method description that takes the provided raw arguments.
|
static <T extends MethodDescription> |
ElementMatchers.takesArguments(int length)
Matches a
MethodDescription by the number of its parameters. |
static <T extends MethodDescription> |
ElementMatchers.takesArguments(Iterable<? extends TypeDescription> typeDescriptions)
Matches a method description that takes the provided raw arguments.
|
static <T extends MethodDescription> |
ElementMatchers.takesArguments(TypeDescription... typeDescription)
Matches a method description that takes the provided raw arguments.
|
static <T extends MethodDescription> |
ElementMatchers.takesGenericArguments(ElementMatcher<? super Iterable<? extends GenericTypeDescription>> matchers)
Matches a
MethodDescription by applying an iterable collection of element matcher on any parameter's TypeDescription . |
static <T extends MethodDescription> |
ElementMatchers.takesGenericArguments(GenericTypeDescription... typeDescription)
Matches a method description that takes the provided generic arguments.
|
static <T extends MethodDescription> |
ElementMatchers.takesGenericArguments(List<? extends GenericTypeDescription> typeDescriptions)
Matches a method description that takes the provided generic arguments.
|
static <T extends MethodDescription> |
ElementMatchers.takesGenericArguments(Type... type)
Matches a method description that takes the provided generic arguments.
|
static <T> ElementMatcher.Junction<Iterable<? extends T>> |
ElementMatchers.whereAny(ElementMatcher<? super T> matcher)
Matches an iterable by assuring that at least one element of the iterable collection matches the
provided matcher.
|
static <T> ElementMatcher.Junction<Iterable<? extends T>> |
ElementMatchers.whereNone(ElementMatcher<? super T> matcher)
Matches an iterable by assuring that no element of the iterable collection matches the provided matcher.
|
Copyright © 2014–2015. All rights reserved.