Top Description Constructors Methods
org.easymock.bytebuddy.matcher

public final Class ElementMatchers

extends Object
Class Inheritance
Imports
org.easymock.bytebuddy.ClassFileVersion, org.easymock.bytebuddy.description.ByteCodeElement, .ModifierReviewable, .NamedElement, org.easymock.bytebuddy.description.annotation.AnnotationDescription, .AnnotationList, .AnnotationSource, org.easymock.bytebuddy.description.field.FieldDescription, .FieldList, org.easymock.bytebuddy.description.method.MethodDescription, .MethodList, .ParameterDescription, .ParameterList, org.easymock.bytebuddy.description.type.TypeDefinition, .TypeDescription, .TypeList, org.easymock.bytebuddy.dynamic.loading.ClassLoadingStrategy, org.easymock.bytebuddy.utility.JavaModule, org.easymock.bytebuddy.utility.nullability.MaybeNull, java.lang.annotation.Annotation, .ElementType, java.lang.reflect.Constructor, .Field, .Method, .Type, java.util.*, java.util.concurrent.ConcurrentHashMap, .ConcurrentMap

A utility class that contains a human-readable language for creating org.easymock.bytebuddy.matcher.ElementMatchers.

Constructor Summary

AccessConstructor and Description
private
ElementMatchers()

A private constructor that must not be invoked.

Method Summary

Modifier and TypeMethod and Description
public static <
The type of the matched object.
T extends AnnotationDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches the annotation's type for being equal to the given type.
annotationType
(Class<? extends Annotation>
The expected annotation type.
type
)

Matches if an annotation is of a given type.

public static <
The type of the matched object.
T extends AnnotationDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches the annotation's type for being equal to the given type.
annotationType
(TypeDescription
The expected annotation type.
type
)

Matches if an annotation is of a given type.

public static <
The type of the matched object.
T extends AnnotationDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches the annotation's type.
annotationType
(ElementMatcher<? super TypeDescription>
The matcher to match the annotation's type against.
matcher
)

Matches if an annotation's type matches the supplied matcher.

public static <
The type of the matched object.
T
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches anything.
any
()

Creates a matcher that always returns true.

public static <
The type of the matched object.
T
>
ElementMatcher.Junction<T>

Returns:

A matcher that checks for the equality with any of the given objects.
anyOf
(Object...
The input values to be compared against.
value
)

Creates a matcher that matches any of the given objects by the java.lang.Object#equals(Object) method.

public static <
The type of the matched object.
T
>
ElementMatcher.Junction<T>

Returns:

A matcher that checks for the equality with any of the given objects.
anyOf
(Iterable<?>
The input values to be compared against.
values
)

Creates a matcher that matches any of the given objects by the java.lang.Object#equals(Object) method.

public static <
The type of the matched object.
T extends TypeDefinition
>
ElementMatcher.Junction<T>

Returns:

A matcher that checks for the equality with any of the given objects.
anyOf
(Type...
The input values to be compared against.
value
)

Creates a matcher that matches any of the given types as TypeDescriptions by the java.lang.Object#equals(Object) method.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that checks for the equality with any of the given objects.
anyOf
(Constructor<?>...
The input values to be compared against.
value
)

Creates a matcher that matches any of the given constructors as MethodDescriptions by the java.lang.Object#equals(Object) method.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that checks for the equality with any of the given objects.
anyOf
(Method...
The input values to be compared against.
value
)

Creates a matcher that matches any of the given methods as MethodDescriptions by the java.lang.Object#equals(Object) method.

public static <
The type of the matched object.
T extends FieldDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that checks for the equality with any of the given objects.
anyOf
(Field...
The input values to be compared against.
value
)

Creates a matcher that matches any of the given fields as FieldDescriptions by the java.lang.Object#equals(Object) method.

public static <
The type of the matched object.
T extends AnnotationDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that checks for the equality with any of the given objects.
anyOf
(Annotation...
The input values to be compared against.
value
)

Creates a matcher that matches any of the given annotations as AnnotationDescriptions by the java.lang.Object#equals(Object) method.

public static <
The type of the matched object.
T
>
ElementMatcher.Junction<T>

Returns:

A matcher that stores the results of a previous matching in the supplied map.
cached
(ElementMatcher<? super T>
The actual matcher for which the results are cached.
matcher
,
ConcurrentMap<? super T, Boolean>
The map for storing results of previously matched elements.
map
)

Wraps another matcher but caches the result of previously matched elements.

public static <
The type of the matched object.
T
>
ElementMatcher.Junction<T>

Returns:

A matcher that stores the results of a previous matching in the supplied map.
cached
(ElementMatcher<? super T>
The actual matcher for which the results are cached.
matcher
,
int
The maximum amount of elements that are stored in the cache. Must be a positive number.
evictionSize
)

Wraps another matcher but caches the result of previously matched elements.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a method description by its declaration of throwing a checked exception.
canThrow
(Class<? extends Throwable>
The type of the exception that should be declared by the method to be matched.
exceptionType
)

Matches a MethodDescription by its capability to throw a given checked exception.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a method description by its declaration of throwing a checked exception.
canThrow
(TypeDescription
The type of the exception that should be declared by the method to be matched.
exceptionType
)

Matches a MethodDescription by its capability to throw a given checked exception.

public static <
The type of the matched object.
T extends AnnotationSource
>
ElementMatcher.Junction<T>

Returns:

A matcher that validates that an annotated element is annotated with an annotation that matches the given matcher.
declaresAnnotation
(ElementMatcher<? super AnnotationDescription>
A matcher to apply on any declared annotation of the matched annotated element.
matcher
)

Matches an AnnotationSource to declare any annotation that matches the given matcher.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any method that exactly matches the provided exception.
declaresException
(Class<? extends Throwable>
The exception type that is matched.
exceptionType
)

Matches a method that declares the given generic exception type as a (erased) exception type.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any method that exactly matches the provided exception.
declaresException
(TypeDescription
The exception type that is matched.
exceptionType
)

Matches a method that declares the given generic exception type as a (erased) exception type.

public static <
The type of the matched object.
T extends TypeDefinition
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any type where another matcher is matched positively on at least on declared field.
declaresField
(ElementMatcher<? super FieldDescription>
The matcher that is applied onto each declared field.
matcher
)

Matches a type by another matcher that is applied on any of its declared fields.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any method that exactly matches the provided generic exception.
declaresGenericException
(Type
The generic exception type that is matched exactly.
exceptionType
)

Matches a method that declares the given generic exception type.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any method that exactly matches the provided generic exception.
declaresGenericException
(TypeDescription.Generic
The generic exception type that is matched exactly.
exceptionType
)

Matches a method that declares the given generic exception type.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that applies the provided matcher to a method's generic exception types.
declaresGenericException
(ElementMatcher<? super Iterable<? extends TypeDescription.Generic>>
The exception matcher to apply onto the matched method's generic exceptions.
matcher
)

Matches a method's generic exception types against the provided matcher.

public static <
The type of the matched object.
T extends TypeDefinition
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any type where another matcher is matched positively on at least on declared methods.
declaresMethod
(ElementMatcher<? super MethodDescription>
The matcher that is applied onto each declared method.
matcher
)

Matches a type by another matcher that is applied on any of its declared methods.

public static <
The matched object's type.
T extends FieldDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a matched field's defined shape.
definedField
(ElementMatcher<? super FieldDescription.InDefinedShape>
The matcher to apply to the matched field's defined shape.
matcher
)

Matches a field in its defined shape.

public static <
The matched object's type.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a matched method's defined shape.
definedMethod
(ElementMatcher<? super MethodDescription.InDefinedShape>
The matcher to apply to the matched method's defined shape.
matcher
)

Matches a method in its defined shape.

public static <
The matched object's type.
T extends ParameterDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a matched parameter's defined shape.
definedParameter
(ElementMatcher<? super ParameterDescription.InDefinedShape>
The matcher to apply to the matched parameter's defined shape.
matcher
)

Matches a parameter in its defined shape.

public static <
The type of the matched object.
T extends TypeDescription.Generic
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a generic type's raw type against the provided non-generic type.
erasure
(Class<?>
The type to match a generic type's erasure against.
type
)

Matches a generic type's erasure against the provided type.

public static <
The type of the matched object.
T extends TypeDescription.Generic
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a generic type's raw type against the provided non-generic type.
erasure
(TypeDescription
The type to match a generic type's erasure against.
type
)

Matches a generic type's erasure against the provided type.

public static <
The type of the matched object.
T extends TypeDescription.Generic
>
ElementMatcher.Junction<T>

Returns:

A type matcher for a generic type that matches the matched type's raw type against the given type description matcher.
erasure
(ElementMatcher<? super TypeDescription>
The matcher to match the matched object's raw type against.
matcher
)

Converts a matcher for a type description into a matcher for the matched type's erasure.

public static <
The type of the matched object.
T extends Iterable<? extends TypeDescription.Generic>
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches an iteration of generic types' raw types against the provided non-generic types.
erasures
(Class<?>...
The types to match.
type
)

Matches an iteration of generic types' erasures against the provided types.

public static <
The type of the matched object.
T extends Iterable<? extends TypeDescription.Generic>
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches an iteration of generic types' raw types against the provided non-generic types.
erasures
(TypeDescription...
The types to match.
type
)

Matches an iteration of generic types' erasures against the provided types.

public static <
The type of the matched object.
T extends Iterable<? extends TypeDescription.Generic>
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches an iteration of generic types' raw types against the provided non-generic types.
erasures
(Iterable<? extends TypeDescription>
The types to match.
types
)

Matches an iteration of generic types' erasures against the provided types.

public static <
The type of the matched object.
T extends Iterable<? extends TypeDescription.Generic>
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches an iteration of generic types' raw types against the provided matcher.
erasures
(ElementMatcher<? super Iterable<? extends TypeDescription>>
The matcher to apply at the erased types.
matcher
)

Applies the provided matchers to an iteration og generic types' erasures.

public static <
The type of the matched object.
T
>
ElementMatcher.Junction<T>

Returns:

A matcher that returns false in case that the given matcher throws an exception.
failSafe
(ElementMatcher<? super T>
The element matcher that potentially throws an exception.
matcher
)

Wraps another matcher to assure that an element is not matched in case that the matching causes an Exception.

public static <
The type of the matched object.
T extends FieldDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher matching the provided field type.
fieldType
(Class<?>
The field type to match.
fieldType
)

Matches a field's raw type against the provided matcher.

public static <
The type of the matched object.
T extends FieldDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher matching the provided field type.
fieldType
(TypeDescription
The field type to match.
fieldType
)

Matches a field's raw type against the provided matcher.

public static <
The type of the matched object.
T extends FieldDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher matching the provided field type.
fieldType
(ElementMatcher<? super TypeDescription>
The matcher to apply to the field's type.
matcher
)

Matches a field's raw type against the provided matcher.

public static <
The type of the matched object.
T extends FieldDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher matching the provided field type.
genericFieldType
(Type
The field type to match.
fieldType
)

Matches a field's generic type against the provided matcher.

public static <
The type of the matched object.
T extends FieldDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher matching the provided field type.
genericFieldType
(TypeDescription.Generic
The field type to match.
fieldType
)

Matches a field's generic type against the provided matcher.

public static <
The type of the matched object.
T extends FieldDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher matching the provided field type.
genericFieldType
(ElementMatcher<? super TypeDescription.Generic>
The matcher to apply to the field's type.
matcher
)

Matches a field's generic type against the provided matcher.

public static <
The type of the matched object.
T extends TypeDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a list of inherited annotation by a given matcher.
hasAnnotation
(ElementMatcher<? super AnnotationDescription>
A matcher to apply onto a list of inherited annotations.
matcher
)

Matches a list of annotations by a given matcher on a type that declared these annotations or inherited them from its super classes.

public static <
The type of the matched object.
T extends ClassLoader
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches all class loaders in the hierarchy of the matched class loader.
hasChild
(ElementMatcher<? super ClassLoader>
The matcher to apply to all class loaders in the hierarchy of the matched class loader.
matcher
)

Matches all class loaders in the hierarchy of the matched class loader against a given matcher.

public static <
The type of the matched object.
T extends TypeDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a type description by its class file version.
hasClassFileVersionAtLeast
(ClassFileVersion
The minimal class file version to match.
classFileVersion
)

Matches a type to have a minimal class file version.

public static <
The type of the matched object.
T extends TypeDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a type description by its class file version.
hasClassFileVersionAtMost
(ClassFileVersion
The maximal class file version to match.
classFileVersion
)

Matches a type to have a maximal class file version.

public static <
The type of the matched object.
T extends NamedElement.WithDescriptor
>
ElementMatcher.Junction<T>

Returns:

A matcher for the given descriptor.
hasDescriptor
(String
The expected descriptor.
descriptor
)

Matches a NamedElement.WithDescriptor's descriptor against a given value.

public static <
The type of the matched object.
T extends TypeDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any type description that declares a super class that matches the provided matcher.
hasGenericSuperClass
(ElementMatcher<? super TypeDescription.Generic>
The type to be checked for being a super class of the matched type.
matcher
)

Matches any type description that declares a super class (but not interface) that matches the provided matcher.

public static <
The type of the matched object.
T extends TypeDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any type description that declares a super type that matches the provided matcher.
hasGenericSuperType
(ElementMatcher<? super TypeDescription.Generic>
The type to be checked for being a super type of the matched type.
matcher
)

Matches any type description that declares a super type that matches the provided matcher.

public static <
The type of the matched object.
T extends ParameterDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches the matched parameter's generic type.
hasGenericType
(ElementMatcher<? super TypeDescription.Generic>
The matcher to apply to a parameter's generic type.
matcher
)

Matches a method parameter by its generic type.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher for a method with the provided internal name.
hasMethodName
(String
The internal name of the method.
internalName
)

Matches a method against its internal name such that constructors and type initializers are matched appropriately.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a method description's parameters against the given constraint.
hasParameters
(ElementMatcher<? super Iterable<? extends ParameterDescription>>
The matcher to apply for validating the parameters.
matcher
)

Matches a MethodDescription by validating that its parameters fulfill a given constraint.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher for a method with the provided signature token.
hasSignature
(MethodDescription.SignatureToken
The signature token to match against.
token
)

Only matches method descriptions that yield the provided signature token.

public static <
The type of the matched object.
T extends TypeDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any type description that declares a super class that matches the provided matcher.
hasSuperClass
(ElementMatcher<? super TypeDescription>
The type to be checked for being a super class of the matched type.
matcher
)

Matches any type description that declares a super class (but not interface) that matches the provided matcher.

public static <
The type of the matched object.
T extends TypeDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any type description that declares a super type that matches the provided matcher.
hasSuperType
(ElementMatcher<? super TypeDescription>
The type to be checked for being a super type of the matched type.
matcher
)

Matches any type description that declares a super type that matches the provided matcher.

public static <
The type of the matched object.
T extends ParameterDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a parameter's type by the given matcher.
hasType
(ElementMatcher<? super TypeDescription>
The matcher to apply to the parameter's type.
matcher
)

Matches a parameter's type by the given matcher.

public static <
The type of the matched object.
T extends TypeDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any inherited annotation by their type.
inheritsAnnotation
(Class<?>
The annotation type to be matched.
type
)

Matches any annotations by their type on a type that declared these annotations or inherited them from its super classes.

public static <
The type of the matched object.
T extends TypeDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any inherited annotation by their type.
inheritsAnnotation
(TypeDescription
The annotation type to be matched.
type
)

Matches any annotations by their type on a type that declared these annotations or inherited them from its super classes.

public static <
The type of the matched object.
T extends TypeDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any inherited annotation by a given matcher.
inheritsAnnotation
(ElementMatcher<? super TypeDescription>
A matcher to apply onto the inherited annotations.
matcher
)

Matches any annotations by a given matcher on a type that declared these annotations or inherited them from its super classes.

public static <
The type of the matched object.
T
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches an exact value.
is
(Object
The value that is to be matched.
value
)

Matches the given value which can also be null by the java.lang.Object#equals(Object) method or by a null-check.

public static <
The type of the matched object.
T extends FieldDescription
>
ElementMatcher.Junction<T>

Returns:

An element matcher that exactly matches the given field in its defined shape.
is
(Field
The field to match by its description
field
)

Exactly matches a given field as a FieldDescription in its defined shape.

public static <
The type of the matched object.
T extends FieldDescription
>
ElementMatcher.Junction<T>

Returns:

An element matcher that exactly matches the given field in its defined shape.
is
(FieldDescription.InDefinedShape
The field to match by its description
field
)

Exactly matches a given field as a FieldDescription in its defined shape.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

An element matcher that exactly matches the given method in its defined shape.
is
(Method
The method to match by its description
method
)

Exactly matches a given method as a MethodDescription in its defined shape.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

An element matcher that exactly matches the given constructor in its defined shape.
is
(Constructor<?>
The constructor to match by its description
constructor
)

Exactly matches a given constructor as a MethodDescription in its defined shape.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

An element matcher that exactly matches the given method or constructor in its defined shape.
is
(MethodDescription.InDefinedShape
The method to match by its description
method
)

Exactly matches a given method or constructor as a MethodDescription in its defined shape.

public static <
The type of the matched object.
T extends ParameterDescription
>
ElementMatcher.Junction<T>

Returns:

An element matcher that exactly matches the given parameter in its defined shape.
is
(ParameterDescription.InDefinedShape
The parameter to match by its description
parameter
)

Exactly matches a given parameter as a ParameterDescription in its defined shape.

public static <
The type of the matched object.
T extends TypeDefinition
>
ElementMatcher.Junction<T>

Returns:

An element matcher that exactly matches the given type.
is
(Type
The type to match by its description
type
)

Exactly matches a given type as a TypeDescription.

public static <
The type of the matched object.
T extends AnnotationDescription
>
ElementMatcher.Junction<T>

Returns:

An element matcher that exactly matches the given annotation.
is
(Annotation
The annotation to match by its description.
annotation
)

Exactly matches a given annotation as an AnnotationDescription.

public static <
The type of the matched object.
T extends ModifierReviewable.OfAbstraction
>
ElementMatcher.Junction<T>

Returns:

A matcher for a abstract modifier reviewable.
isAbstract
()

Matches a ModifierReviewable.OfAbstraction that is abstract.

public static <
The type of the matched object.
T extends ByteCodeElement
>
ElementMatcher.Junction<T>

Returns:

A matcher for a byte code element to be accessible to a given type.
isAccessibleTo
(Class<?>
The type that a matched byte code element is expected to be accessible to.
type
)

Matches a ByteCodeElement that is accessible to a given java.lang.Class.

public static <
The type of the matched object.
T extends ByteCodeElement
>
ElementMatcher.Junction<T>

Returns:

A matcher for a byte code element to be accessible to a given type.
isAccessibleTo
(TypeDescription
The type that a matched byte code element is expected to be accessible to.
type
)

Matches a ByteCodeElement that is accessible to a given java.lang.Class.

public static <
The type of the matched object.
T extends AnnotationSource
>
ElementMatcher.Junction<T>

Returns:

A matcher that validates that an annotated element is annotated with an annotation of type.
isAnnotatedWith
(Class<? extends Annotation>
The annotation type to match against.
type
)

Matches an AnnotationSource for declared annotations.

public static <
The type of the matched object.
T extends AnnotationSource
>
ElementMatcher.Junction<T>

Returns:

A matcher that validates that an annotated element is annotated with an annotation of type.
isAnnotatedWith
(TypeDescription
The annotation type to match against.
type
)

Matches an AnnotationSource for declared annotations.

public static <
The type of the matched object.
T extends AnnotationSource
>
ElementMatcher.Junction<T>

Returns:

A matcher that validates that an annotated element is annotated with an annotation of a type that matches the given matcher.
isAnnotatedWith
(ElementMatcher<? super TypeDescription>
The matcher to apply to any annotation's type found on the matched annotated element.
matcher
)

Matches an AnnotationSource for declared annotations.

public static <
The type of the matched object.
T extends TypeDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher for an annotation type.
isAnnotation
()

Matches a TypeDescription that is an annotation type.

public static <
The type of the matched object.
T extends TypeDefinition
>
ElementMatcher.Junction<T>

Returns:

A matcher that determines if a type is an array type.
isArray
()

Matches a type if it is an array type.

public static <
The type of the matched object.
T extends ClassLoader
>
ElementMatcher.Junction<T>

Returns:

A matcher that only matches the bootstrap class loader.
isBootstrapClassLoader
()

Matches exactly the bootstrap java.lang.ClassLoader.

public static <
The type of the matched object.
T extends ModifierReviewable.ForMethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher for a bridge method.
isBridge
()

Matches a MethodDescription that is a bridge.

public static <
The type of the matched object.
T extends ClassLoader
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches the given class loader and any class loader that is a child of the given class loader.
isChildOf
(ClassLoader
The class loader of which child class loaders are matched.
classLoader
)

Matches any class loader that is either the given class loader or a child of the given class loader.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that only matches the Object#clone() method.
isClone
()

Only matches the Object#clone() method, also if it was overridden.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that only matches method descriptions that represent a Java constructor.
isConstructor
()

Only matches method descriptions that represent a java.lang.reflect.Constructor.

public static <
The type of the matched object.
T extends ByteCodeElement
>
ElementMatcher.Junction<T>

Returns:

A matcher for byte code elements being declared by the given type.
isDeclaredBy
(Class<?>
The type that is expected to declare the matched byte code element.
type
)

Matches a ByteCodeElement for being declared by a given java.lang.Class.

public static <
The type of the matched object.
T extends ByteCodeElement
>
ElementMatcher.Junction<T>

Returns:

A matcher for byte code elements being declared by the given type.
isDeclaredBy
(TypeDescription
The type that is expected to declare the matched byte code element.
type
)

Matches a ByteCodeElement for being declared by a given TypeDescription.

public static <
The type of the matched object.
T extends ByteCodeElement
>
ElementMatcher.Junction<T>

Returns:

A matcher for byte code elements being declared by a type matched by the given matcher.
isDeclaredBy
(ElementMatcher<? super TypeDescription>
A matcher for the declaring type of the matched byte code element as long as it is not null.
matcher
)

Matches a ByteCodeElement for being declared by a TypeDescription that is matched by the given matcher.

public static <
The type of the matched object.
T extends ByteCodeElement
>
ElementMatcher.Junction<T>

Returns:

A matcher for byte code elements being declared by the given type.
isDeclaredByGeneric
(Type
The type that is expected to declare the matched byte code element.
type
)

Matches a ByteCodeElement for being declared by a given generic Type.

public static <
The type of the matched object.
T extends ByteCodeElement
>
ElementMatcher.Junction<T>

Returns:

A matcher for byte code elements being declared by the given type.
isDeclaredByGeneric
(TypeDescription.Generic
The type that is expected to declare the matched byte code element.
type
)

Matches a ByteCodeElement for being declared by a given TypeDescription.Generic.

public static <
The type of the matched object.
T extends ByteCodeElement
>
ElementMatcher.Junction<T>

Returns:

A matcher for byte code elements being declared by a type matched by the given matcher.
isDeclaredByGeneric
(ElementMatcher<? super TypeDescription.Generic>
A matcher for the declaring type of the matched byte code element as long as it is not null.
matcher
)

Matches a ByteCodeElement for being declared by a TypeDescription.Generic that is matched by the given matcher.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a default constructor.
isDefaultConstructor
()

Matches a default constructor, i.e. a constructor without arguments.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that only matches a non-overridden Object#finalize() method.
isDefaultFinalizer
()

Only matches the Object#finalize() method if it was not overridden.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that only matches Java 8 default methods.
isDefaultMethod
()

Only matches Java 8 default methods.

public static <
The type of the matched object.
T extends ModifierReviewable.OfEnumeration
>
ElementMatcher.Junction<T>

Returns:

A matcher for an enum.
isEnum
()

Matches a ModifierReviewable.OfEnumeration that is an enum or a field holding an enum.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that only matches the Object#equals(Object) method.
isEquals
()

Only matches the Object#equals(Object) method, also if it was overridden.

public static <
The type of the matched object.
T extends ClassLoader
>
ElementMatcher.Junction<T>

Returns:

A matcher that only matches the extension class loader.
isExtensionClassLoader
()

Matches exactly the extension java.lang.ClassLoader.

public static <
The type of the matched object.
T extends ModifierReviewable
>
ElementMatcher.Junction<T>

Returns:

A matcher for a final modifier reviewable.
isFinal
()

Matches a ModifierReviewable that is final.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that only matches the Object#finalize() method.
isFinalizer
()

Only matches the Object#finalize() method, even if it was overridden.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a getter method with the given type.
isGenericGetter
(Type
The required getter type.
type
)

Matches any Java bean getter method which returns the given type.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a getter method with the given type.
isGenericGetter
(TypeDescription.Generic
The required getter type.
type
)

Matches any Java bean getter method which returns the given type.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a getter method with a return type that matches the supplied matcher.
isGenericGetter
(ElementMatcher<? super TypeDescription.Generic>
A matcher to be allied to a getter method's argument type.
matcher
)

Matches any Java bean getter method which returns a value with a type matches the supplied matcher.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any setter method.
isGenericSetter
(Type
The required setter type.
type
)

Matches any Java bean setter method which takes an argument the given type.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a setter method with the specified argument type.
isGenericSetter
(TypeDescription.Generic
The required setter type.
type
)

Matches any Java bean setter method which takes an argument the given type.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a setter method with an argument type that matches the supplied matcher.
isGenericSetter
(ElementMatcher<? super TypeDescription.Generic>
A matcher to be allied to a setter method's argument type.
matcher
)

Matches any Java bean setter method which takes an argument that matches the supplied matcher.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any getter method.
isGetter
()

Matches any Java bean getter method.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any getter method for the supplied property.
isGetter
(String
The property to match a getter for.
property
)

An element matcher that matches any getter for the given property.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a getter method with the given type.
isGetter
(Class<?>
The required getter type.
type
)

Matches any Java bean getter method which returns the given type.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a getter method with the given type.
isGetter
(TypeDescription
The required getter type.
type
)

Matches any Java bean getter method which returns the given type.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a getter method with a return type that matches the supplied matcher.
isGetter
(ElementMatcher<? super TypeDescription>
A matcher to be allied to a getter method's argument type.
matcher
)

Matches any Java bean getter method which returns a value with a type matches the supplied matcher.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that only matches the Object#hashCode() method.
isHashCode
()

Only matches the Object#hashCode() method, also if it was overridden.

public static <
The type of the matched object.
T extends TypeDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher for an interface.
isInterface
()

Matches a TypeDescription that is an interface.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a Java main method.
isMain
()

Matches a Java main method as an application entry point.

public static <
The type of the matched object.
T extends ParameterDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher for a mandated parameter.
isMandated
()

Matches a parameter description for a mandated parameter.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that only matches method descriptions that represent a Java method.
isMethod
()

Only matches method descriptions that represent a java.lang.reflect.Method.

public static <
The type of the matched object.
T extends NamedElement.WithOptionalName
>
ElementMatcher.Junction<T>

Returns:

An element matcher that checks if the matched optionally named element has an explicit name.
isNamed
()

Matches a NamedElement.WithOptionalName for having an explicit name.

public static <
The type of the matched object.
T extends ModifierReviewable.ForMethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher for a native method description.
isNative
()

Matches a MethodDescription that is native.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that checks a method's signature equality for any method declared by the declaring type.
isOverriddenFrom
(Class<?>
The super type of interest for which to check if it declares a method with the same signature as the matched method.
type
)

Matches any virtual method with a signature that is compatible to a method that is declared the supplied type.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that checks a method's signature equality for any method declared by the declaring type.
isOverriddenFrom
(TypeDescription
The super type of interest for which to check if it declares a method with the same signature as the matched method.
type
)

Matches any virtual method with a signature that is compatible to a method that is declared the supplied type.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that checks a method's signature equality for any method declared by the declaring type.
isOverriddenFrom
(ElementMatcher<? super TypeDescription>
A matcher for a method's declaring type that needs to be matched if that type declares a method with the same signature as the matched method.
matcher
)

Matches any virtual method with a signature that is compatible to a method that is declared by a type that matches the supplied matcher.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that checks a method's signature equality for any method declared by the declaring type.
isOverriddenFromGeneric
(Type
The super type of interest for which to check if it declares a method with the same signature as the matched method.
type
)

Matches any virtual method with a signature that is compatible to a method that is declared the supplied type.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that checks a method's signature equality for any method declared by the declaring type.
isOverriddenFromGeneric
(TypeDescription.Generic
The super type of interest for which to check if it declares a method with the same signature as the matched method.
type
)

Matches any virtual method with a signature that is compatible to a method that is declared the supplied type.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that checks a method's signature equality for any method declared by the declaring type.
isOverriddenFromGeneric
(ElementMatcher<? super TypeDescription.Generic>
A matcher for a method's declaring type that needs to be matched if that type declares a method with the same signature as the matched method.
matcher
)

Matches any virtual method with a signature that is compatible to a method that is declared by a type that matches the supplied matcher.

public static <
The type of the matched object.
T extends ModifierReviewable.OfByteCodeElement
>
ElementMatcher.Junction<T>

Returns:

A matcher for a package-private modifier reviewable.
isPackagePrivate
()

Matches a ModifierReviewable that is package-private.

public static <
The type of the matched object.
T extends ClassLoader
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches the given class loader and any class loader that is a parent of the given class loader.
isParentOf
(ClassLoader
The class loader of which parent class loaders are matched.
classLoader
)

Matches any class loader that is either the given class loader or a parent of the given class loader.

public static <
The type of the matched object.
T extends TypeDefinition
>
ElementMatcher.Junction<T>

Returns:

A matcher that determines if a type is primitive.
isPrimitive
()

Matches a type if it is primitive.

public static <
The type of the matched object.
T extends ModifierReviewable.OfByteCodeElement
>
ElementMatcher.Junction<T>

Returns:

A matcher for a private modifier reviewable.
isPrivate
()

Matches a ModifierReviewable that is private.

public static <
The type of the matched object.
T extends ModifierReviewable.OfByteCodeElement
>
ElementMatcher.Junction<T>

Returns:

A matcher for a protected modifier reviewable.
isProtected
()

Matches a ModifierReviewable that is protected.

public static <
The type of the matched object.
T extends ModifierReviewable.OfByteCodeElement
>
ElementMatcher.Junction<T>

Returns:

A matcher for a public modifier reviewable.
isPublic
()

Matches a ModifierReviewable that is public.

public static <
The type of the matched object.
T extends TypeDefinition
>
ElementMatcher.Junction<T>

Returns:

A matcher that determines if a type is a record type.
isRecord
()

Matches a type if it is a record type.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any setter method.
isSetter
()

Matches any Java bean setter method.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any setter method for the supplied property.
isSetter
(String
The property to match a setter for.
property
)

An element matcher that matches any setter for the given property.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any setter method.
isSetter
(Class<?>
The required setter type.
type
)

Matches any Java bean setter method which takes an argument the given type.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a setter method with the specified argument type.
isSetter
(TypeDescription
The required setter type.
type
)

Matches any Java bean setter method which takes an argument the given type.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a setter method with an argument type that matches the supplied matcher.
isSetter
(ElementMatcher<? super TypeDescription>
A matcher to be allied to a setter method's argument type.
matcher
)

Matches any Java bean setter method which takes an argument that matches the supplied matcher.

public static <
The type of the matched object.
T extends ModifierReviewable.OfByteCodeElement
>
ElementMatcher.Junction<T>

Returns:

A matcher for a static modifier reviewable.
isStatic
()

Matches a ModifierReviewable that is static.

public static <
The type of the matched object.
T extends ModifierReviewable.ForMethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher for a strictfp method description.
isStrict
()

Matches a MethodDescription that is strictfp.

public static <
The type of the matched object.
T extends TypeDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any type description that represents a sub type of the given type.
isSubTypeOf
(Class<?>
The type to be checked for being a subtype of the matched type.
type
)

Matches any type description that is a subtype of the given type.

public static <
The type of the matched object.
T extends TypeDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any type description that represents a sub type of the given type.
isSubTypeOf
(TypeDescription
The type to be checked for being a subtype of the matched type.
type
)

Matches any type description that is a subtype of the given type.

public static <
The type of the matched object.
T extends TypeDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any type description that represents a super type of the given type.
isSuperTypeOf
(Class<?>
The type to be checked for being a subtype of the matched type.
type
)

Matches any type description that is a super type of the given type.

public static <
The type of the matched object.
T extends TypeDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches any type description that represents a super type of the given type.
isSuperTypeOf
(TypeDescription
The type to be checked for being a subtype of the matched type.
type
)

Matches any type description that is a super type of the given type.

public static <
The type of the matched object.
T extends ModifierReviewable.ForMethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher for a synchronized method description.
isSynchronized
()

Matches a MethodDescription that is synchronized.

public static <
The type of the matched object.
T extends ModifierReviewable
>
ElementMatcher.Junction<T>

Returns:

A matcher for a synthetic modifier reviewable.
isSynthetic
()

Matches a ModifierReviewable that is synthetic.

public static <
The type of the matched object.
T extends ClassLoader
>
ElementMatcher.Junction<T>

Returns:

A matcher that only matches the system class loader.
isSystemClassLoader
()

Matches exactly the system java.lang.ClassLoader.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that only matches the Object#toString() method.
isToString
()

Only matches the Object#toString() method, also if it was overridden.

public static <
The type of the matched object.
T extends FieldDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher for a transient field.
isTransient
()

Matches a transient field.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that only matches method descriptions that represent the type initializer.
isTypeInitializer
()

Only matches method descriptions that represent a java.lang.Class type initializer.

public static <
The type of the matched object.
T extends ModifierReviewable.ForMethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher for a var-args method description.
isVarArgs
()

Matches a MethodDescription that is a var-args.

public static <
The type of the matched object.
T extends TypeDefinition
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches type variables with the given name.
isVariable
(String
The name of the type variable to be match.
symbol
)

Matches a type variable with the given name.

public static <
The type of the matched object.
T extends TypeDefinition
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches type variables with the given name.
isVariable
(ElementMatcher<? super NamedElement>
A matcher for the type variable's name.
matcher
)

Matches a type variable with the given name.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher for virtual methods.
isVirtual
()

Matches any method that is virtual, i.e. non-constructors that are non-static and non-private.

public static <
The type of the matched object.
T extends ByteCodeElement
>
ElementMatcher.Junction<T>

Returns:

A matcher for a byte code element to be visible to a given type.
isVisibleTo
(Class<?>
The type that a matched byte code element is expected to be visible to.
type
)

Matches a ByteCodeElement that is visible to a given java.lang.Class.

public static <
The type of the matched object.
T extends ByteCodeElement
>
ElementMatcher.Junction<T>

Returns:

A matcher for a byte code element to be visible to a given type.
isVisibleTo
(TypeDescription
The type that a matched byte code element is expected to be visible to.
type
)

Matches a ByteCodeElement that is visible to a given TypeDescription.

public static <
The type of the matched object.
T extends FieldDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher for a volatile field.
isVolatile
()

Matches a volatile field.

public static <
The type of the matched object.
T extends NamedElement
>
ElementMatcher.Junction<T>

Returns:

An element matcher for a named element's name's infix.
nameContains
(String
The expected infix of the name.
infix
)

Matches a NamedElement for an infix of its name.

public static <
The type of the matched object.
T extends NamedElement
>
ElementMatcher.Junction<T>

Returns:

An element matcher for a named element's name's infix.
nameContainsIgnoreCase
(String
The expected infix of the name.
infix
)

Matches a NamedElement for an infix of its name.

public static <
The type of the matched object.
T extends NamedElement
>
ElementMatcher.Junction<T>

Returns:

An element matcher for a named element's exact name.
named
(String
The expected name.
name
)

Matches a NamedElement for its exact name.

public static <
The type of the matched object.
T extends NamedElement
>
ElementMatcher.Junction<T>

Returns:

An element matcher for a named element's name.
namedIgnoreCase
(String
The expected name.
name
)

Matches a NamedElement for its name.

public static <
The type of the matched object.
T extends NamedElement
>
ElementMatcher.Junction<T>

Returns:

An element matcher which matches if the element's name is found in the set.
namedOneOf
(String...
The set of expected names.
names
)

Matches a NamedElement for its membership of a set.

public static <
The type of the matched object.
T extends NamedElement
>
ElementMatcher.Junction<T>

Returns:

An element matcher for a named element's name's suffix.
nameEndsWith
(String
The expected name's suffix.
suffix
)

Matches a NamedElement for its name's suffix.

public static <
The type of the matched object.
T extends NamedElement
>
ElementMatcher.Junction<T>

Returns:

An element matcher for a named element's name's suffix.
nameEndsWithIgnoreCase
(String
The expected name's suffix.
suffix
)

Matches a NamedElement for its name's suffix.

public static <
The type of the matched object.
T extends NamedElement
>
ElementMatcher.Junction<T>

Returns:

An element matcher for a named element's name's against the given regular expression.
nameMatches
(String
The regular expression to match the name against.
regex
)

Matches a NamedElement name against a regular expression.

public static <
The type of the matched object.
T extends NamedElement
>
ElementMatcher.Junction<T>

Returns:

An element matcher for a named element's name's prefix.
nameStartsWith
(String
The expected name's prefix.
prefix
)

Matches a NamedElement for its name's prefix.

public static <
The type of the matched object.
T extends NamedElement
>
ElementMatcher.Junction<T>

Returns:

An element matcher for a named element's name's prefix.
nameStartsWithIgnoreCase
(String
The expected name's prefix.
prefix
)

Matches a NamedElement for its name's prefix.

public static <
The type of the matched object.
T
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches nothing.
none
()

Creates a matcher that always returns false.

public static <
The type of the matched object.
T
>
ElementMatcher.Junction<T>

Returns:

A matcher that checks for the equality with none of the given objects.
noneOf
(Object...
The input values to be compared against.
value
)

Creates a matcher that matches none of the given objects by the java.lang.Object#equals(Object) method.

public static <
The type of the matched object.
T
>
ElementMatcher.Junction<T>

Returns:

A matcher that checks for the equality with none of the given objects.
noneOf
(Iterable<?>
The input values to be compared against.
values
)

Creates a matcher that matches none of the given objects by the java.lang.Object#equals(Object) method.

public static <
The type of the matched object.
T extends TypeDefinition
>
ElementMatcher.Junction<T>

Returns:

A matcher that checks for the equality with none of the given objects.
noneOf
(Type...
The input values to be compared against.
value
)

Creates a matcher that matches none of the given types as TypeDescriptions by the java.lang.Object#equals(Object) method.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that checks for the equality with none of the given objects.
noneOf
(Constructor<?>...
The input values to be compared against.
value
)

Creates a matcher that matches none of the given constructors as MethodDescriptions by the java.lang.Object#equals(Object) method.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that checks for the equality with none of the given objects.
noneOf
(Method...
The input values to be compared against.
value
)

Creates a matcher that matches none of the given methods as MethodDescriptions by the java.lang.Object#equals(Object) method.

public static <
The type of the matched object.
T extends FieldDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that checks for the equality with none of the given objects.
noneOf
(Field...
The input values to be compared against.
value
)

Creates a matcher that matches none of the given methods as FieldDescriptions by the java.lang.Object#equals(Object) method.

public static <
The type of the matched object.
T extends AnnotationDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that checks for the equality with any of the given objects.
noneOf
(Annotation...
The input values to be compared against.
value
)

Creates a matcher that matches none of the given annotations as AnnotationDescriptions by the java.lang.Object#equals(Object) method.

public static <
The type of the matched object.
T
>
ElementMatcher.Junction<T>

Returns:

An inverted version of the given matcher.
not
(ElementMatcher<? super T>
The matcher to invert.
matcher
)

Inverts another matcher.

public static <
The type of the matched object.
T extends TypeDefinition
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches generic types of the given sort.
ofSort
(TypeDefinition.Sort
The generic type sort to match.
sort
)

Matches generic type descriptions of the given sort.

public static <
The type of the matched object.
T extends TypeDefinition
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches generic types of the given sort.
ofSort
(ElementMatcher<? super TypeDefinition.Sort>
A matcher for a generic type's sort.
matcher
)

Matches generic type descriptions of the given sort.

public static <
The type of the matched object.
T extends ClassLoader
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches the class loader's type.
ofType
(ElementMatcher<? super TypeDescription>
The matcher to apply to the class loader's type.
matcher
)

Matches a class loader's type unless it is the bootstrap class loader which is never matched.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

An element matcher that matches a given return type for a method description.
returns
(Class<?>
The raw type the matched method is expected to return.
type
)

Matches MethodDescriptions that return a given erasure type.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

An element matcher that matches a given return type for a method description.
returns
(TypeDescription
The raw type the matched method is expected to return.
type
)

Matches MethodDescriptions that return a given erasure type.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches the matched method's return type's erasure.
returns
(ElementMatcher<? super TypeDescription>
The matcher to apply to a method's return type's erasure.
matcher
)

Matches a method's return type's erasure by the given matcher.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

An element matcher that matches a given generic return type for a method description.
returnsGeneric
(Type
The generic type the matched method is expected to return.
type
)

Matches MethodDescriptions that return a given generic type.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

An element matcher that matches a given return type for a method description.
returnsGeneric
(TypeDescription.Generic
The type the matched method is expected to return.
type
)

Matches MethodDescriptions that returns a given TypeDescription.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

An element matcher that matches a given return type against another matcher.
returnsGeneric
(ElementMatcher<? super TypeDescription.Generic>
A matcher to apply onto a matched method's return type.
matcher
)

Matches MethodDescriptions that match a matched method's return type.

public static <
The type of the matched object.
T extends JavaModule
>
ElementMatcher.Junction<T>

Returns:

A matcher that validates a module's existence.
supportsModules
()

Matches a module if it exists, i.e. not null.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

An element matcher that matches a given argument type for a method description.
takesArgument
(int
The index of the parameter.
index
,
Class<?>
The erasure of the type the matched method is expected to define as a parameter type.
type
)

Matches MethodDescriptions that define a given generic type as a parameter at the given index.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

An element matcher that matches a given argument type for a method description.
takesArgument
(int
The index of the parameter.
index
,
TypeDescription
The erasure of the type the matched method is expected to define as a parameter type.
type
)

Matches MethodDescriptions that define a given type erasure as a parameter at the given index.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

An element matcher that matches a given argument type for a method description.
takesArgument
(int
The index of the parameter.
index
,
ElementMatcher<? super TypeDescription>
A matcher to apply to the argument at the specified index.
matcher
)

Matches MethodDescriptions that define a type erasure as a parameter at the given index that matches the supplied matcher.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A method matcher that matches a method's raw parameter types against the supplied arguments.
takesArguments
(Class<?>...
The arguments to match against the matched method.
type
)

Matches a method description that takes the provided raw arguments.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A method matcher that matches a method's raw parameter types against the supplied arguments.
takesArguments
(TypeDescription...
The arguments to match against the matched method.
type
)

Matches a method description that takes the provided raw arguments.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A method matcher that matches a method's raw parameter types against the supplied arguments.
takesArguments
(Iterable<? extends TypeDescription>
The arguments to match against the matched method.
types
)

Matches a method description that takes the provided raw arguments.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a method description by applying another element matcher onto each parameter's type.
takesArguments
(ElementMatcher<? super Iterable<? extends TypeDescription>>
The matcher that are applied onto the parameter types of the matched method description.
matchers
)

Matches a MethodDescription by applying an iterable collection of element matcher on any parameter's TypeDescription.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a method description by the number of its parameters.
takesArguments
(int
The expected length.
length
)

Matches a MethodDescription by the number of its parameters.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

An element matcher that matches a given generic return type for a method description.
takesGenericArgument
(int
The index of the parameter.
index
,
Type
The generic type the matched method is expected to define as a parameter type.
type
)

Matches MethodDescriptions that define a given generic type as a parameter at the given index.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

An element matcher that matches a given generic return type for a method description.
takesGenericArgument
(int
The index of the parameter.
index
,
TypeDescription.Generic
The generic type the matched method is expected to define as a parameter type.
type
)

Matches MethodDescriptions that define a given generic type as a parameter at the given index.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

An element matcher that matches a given generic return type for a method description.
takesGenericArgument
(int
The index of the parameter.
index
,
ElementMatcher<? super TypeDescription.Generic>
A matcher for the generic type the matched method is expected to define as a parameter type.
matcher
)

Matches MethodDescriptions that define a given generic type as a parameter at the given index.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A method matcher that matches a method's generic parameter types against the supplied arguments.
takesGenericArguments
(Type...
The arguments to match against the matched method.
type
)

Matches a method description that takes the provided generic arguments.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A method matcher that matches a method's generic parameter types against the supplied arguments.
takesGenericArguments
(TypeDefinition...
The arguments to match against the matched method.
type
)

Matches a method description that takes the provided generic arguments.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A method matcher that matches a method's generic parameter types against the supplied arguments.
takesGenericArguments
(List<? extends TypeDefinition>
The arguments to match against the matched method.
types
)

Matches a method description that takes the provided generic arguments.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a method description by applying another element matcher onto each parameter's type.
takesGenericArguments
(ElementMatcher<? super Iterable<? extends TypeDescription.Generic>>
The matcher that are applied onto the parameter types of the matched method description.
matchers
)

Matches a MethodDescription by applying an iterable collection of element matcher on any parameter's TypeDescription.Generic.

public static <
The type of the matched object.
T extends MethodDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches a method description by the number of its parameters.
takesNoArguments
()

Matches a MethodDescription with no parameters.

public static <
The type of the matched object.
T extends AnnotationDescription
>
ElementMatcher.Junction<T>

Returns:

A matcher that matches annotations that target an element type.
targetsElement
(ElementType
The element type we target.
elementType
)

Matches if an annotation can target a given element type.

public static <
The type of the matched object.
T
>
ElementMatcher.Junction<Iterable<? extends T>>

Returns:

A matcher that matches an iterable if at least one element matches the provided matcher.
whereAny
(ElementMatcher<? super T>
The matcher to apply to each element.
matcher
)

Matches an iterable by assuring that at least one element of the iterable collection matches the provided matcher.

public static <
The type of the matched object.
T
>
ElementMatcher.Junction<Iterable<? extends T>>

Returns:

A matcher that matches an iterable if no element matches the provided matcher.
whereNone
(ElementMatcher<? super T>
The matcher to apply to each element.
matcher
)

Matches an iterable by assuring that no element of the iterable collection matches the provided matcher.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait