Package | Description |
---|---|
net.bytebuddy.matcher |
Contains an API for matching Java byte code entities.
|
Modifier and Type | Class and Description |
---|---|
class |
AccessibilityMatcher<T extends ByteCodeElement>
An element matcher that validates that a given byte code element is accessible to a given type.
|
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 |
CachingMatcher<T>
A matcher that remembers the results of previously matching an equal target.
|
static class |
CachingMatcher.WithInlineEviction<S>
A caching matcher with inline cache eviction.
|
class |
ClassLoaderHierarchyMatcher<T extends ClassLoader>
An element matcher that matches all
ClassLoader s in the matched class loaders hierarchy
against a given matcher. |
class |
ClassLoaderParentMatcher<T extends ClassLoader>
An element matcher that matches a class loader for being a parent of the given class loader.
|
class |
CollectionElementMatcher<T>
A matcher that matches a given element of a collection.
|
class |
CollectionErasureMatcher<T extends Iterable<? extends TypeDefinition>>
An element matcher that matches a collection of types by their erasures.
|
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 |
CollectionSizeMatcher<T extends Iterable<?>>
An element matcher that matches a collection by its size.
|
class |
DeclaringAnnotationMatcher<T extends AnnotationSource>
An element matcher that matches the list of annotations that are provided by an annotated element.
|
class |
DeclaringFieldMatcher<T extends TypeDefinition>
An element matcher that checks if a type description declares fields of a given property.
|
class |
DeclaringMethodMatcher<T extends TypeDefinition>
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 |
ErasureMatcher<T extends TypeDefinition>
An element matcher that matches its argument's
TypeDescription.Generic raw type against the
given matcher for a TypeDescription . |
class |
FailSafeMatcher<T>
A fail-safe matcher catches exceptions that are thrown by a delegate matcher and returns an alternative value.
|
class |
FieldTypeMatcher<T extends FieldDescription>
An element matcher that matches a field's type.
|
class |
HasSuperTypeMatcher<T extends TypeDescription>
An element matcher that matches a super type.
|
class |
InheritedAnnotationMatcher<T extends TypeDescription>
An element matcher that matches the list of inherited annotations of a type description.
|
class |
InstanceTypeMatcher<T>
An element matcher that matches an object's type.
|
class |
IsNamedMatcher<T extends NamedElement.WithOptionalName>
An element matcher that matches a named element only if is explicitly named.
|
class |
MethodExceptionTypeMatcher<T extends MethodDescription>
An element matcher that matches the exceptions that are declared by a method.
|
class |
MethodOverrideMatcher<T extends MethodDescription>
A matcher that checks if any super type of a type declares a method with the same shape of a matched 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. |
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 |
SignatureTokenMatcher<T extends MethodDescription>
Matches a method description's signature token against another matcher.
|
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 |
TypeSortMatcher<T extends TypeDefinition>
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 extends AnnotationDescription> |
ElementMatchers.annotationType(Class<? extends Annotation> type)
Matches if an annotation is of a given type.
|
static <T extends AnnotationDescription> |
ElementMatchers.annotationType(ElementMatcher<? super TypeDescription> matcher)
Matches if an annotation's type matches the supplied matcher.
|
static <T extends AnnotationDescription> |
ElementMatchers.annotationType(TypeDescription type)
Matches if an annotation is of a given type.
|
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 TypeDefinition> |
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> ElementMatcher.Junction<T> |
ElementMatchers.cached(ElementMatcher<? super T> matcher,
ConcurrentMap<? super T,Boolean> map)
Wraps another matcher but caches the result of previously matched elements.
|
static <T> ElementMatcher.Junction<T> |
ElementMatchers.cached(ElementMatcher<? super T> matcher,
int evictionSize)
Wraps another matcher but caches the result of previously matched elements.
|
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 AnnotationSource> |
ElementMatchers.declaresAnnotation(ElementMatcher<? super AnnotationDescription> matcher)
Matches an
AnnotationSource 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 TypeDefinition> |
ElementMatchers.declaresField(ElementMatcher<? super FieldDescription> matcher)
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 TypeDescription.Generic>> matcher)
Matches a method's generic exception types against the provided matcher.
|
static <T extends MethodDescription> |
ElementMatchers.declaresGenericException(Type exceptionType)
Matches a method that declares the given generic exception type.
|
static <T extends MethodDescription> |
ElementMatchers.declaresGenericException(TypeDescription.Generic exceptionType)
Matches a method that declares the given generic exception type.
|
static <T extends TypeDefinition> |
ElementMatchers.declaresMethod(ElementMatcher<? super MethodDescription> matcher)
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 TypeDescription.Generic> |
ElementMatchers.erasure(Class<?> type)
Matches a generic type's erasure against the provided type.
|
static <T extends TypeDescription.Generic> |
ElementMatchers.erasure(ElementMatcher<? super TypeDescription> matcher)
Converts a matcher for a type description into a matcher for the matched type's erasure.
|
static <T extends TypeDescription.Generic> |
ElementMatchers.erasure(TypeDescription type)
Matches a generic type's erasure against the provided type.
|
static <T extends Iterable<? extends TypeDescription.Generic>> |
ElementMatchers.erasures(Class<?>... type)
Matches an iteration of generic types' erasures against the provided types.
|
static <T extends Iterable<? extends TypeDescription.Generic>> |
ElementMatchers.erasures(ElementMatcher<? super Iterable<? extends TypeDescription>> matcher)
Applies the provided matchers to an iteration og generic types' erasures.
|
static <T extends Iterable<? extends TypeDescription.Generic>> |
ElementMatchers.erasures(Iterable<? extends TypeDescription> types)
Matches an iteration of generic types' erasures against the provided types.
|
static <T extends Iterable<? extends TypeDescription.Generic>> |
ElementMatchers.erasures(TypeDescription... type)
Matches an iteration of generic types' erasures against the provided types.
|
static <T> ElementMatcher.Junction<T> |
ElementMatchers.failSafe(ElementMatcher<? super T> matcher)
Wraps another matcher to assure that an element is not matched in case that the matching causes an
Exception . |
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 TypeDescription> 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 TypeDescription.Generic> matcher)
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 FieldDescription> |
ElementMatchers.genericFieldType(TypeDescription.Generic 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 ClassLoader> |
ElementMatchers.hasChild(ElementMatcher<? super ClassLoader> matcher)
Matches all class loaders in the hierarchy of the matched class loader against a given matcher.
|
static <T extends ByteCodeElement> |
ElementMatchers.hasDescriptor(String descriptor)
Matches a
ByteCodeElement 's descriptor against a given value. |
static <T extends TypeDescription> |
ElementMatchers.hasGenericSuperType(ElementMatcher<? super TypeDescription.Generic> matcher)
Matches any type description that declares a super type that matches the provided matcher.
|
static <T extends ParameterDescription> |
ElementMatchers.hasGenericType(ElementMatcher<? super TypeDescription.Generic> 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 MethodDescription> |
ElementMatchers.hasSignature(MethodDescription.SignatureToken token)
Only matches method descriptions that yield the provided signature token.
|
static <T extends TypeDescription> |
ElementMatchers.hasSuperType(ElementMatcher<? super TypeDescription> matcher)
Matches any type description that declares a super type that matches the provided matcher.
|
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 type)
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 in its defined shape. |
static <T extends FieldDescription> |
ElementMatchers.is(Field field)
Exactly matches a given field as a
FieldDescription in its defined shape. |
static <T extends FieldDescription> |
ElementMatchers.is(FieldDescription.InDefinedShape field)
Exactly matches a given field as a
FieldDescription in its defined shape. |
static <T extends MethodDescription> |
ElementMatchers.is(Method method)
Exactly matches a given method as a
MethodDescription in its defined shape. |
static <T extends MethodDescription> |
ElementMatchers.is(MethodDescription.InDefinedShape method)
Exactly matches a given method or constructor as a
MethodDescription in its defined shape. |
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 ParameterDescription> |
ElementMatchers.is(ParameterDescription.InDefinedShape parameter)
Exactly matches a given parameter as a
ParameterDescription in its defined shape. |
static <T extends TypeDefinition> |
ElementMatchers.is(Type type)
Exactly matches a given type as a
TypeDescription . |
static <T extends ModifierReviewable.OfAbstraction> |
ElementMatchers.isAbstract()
Matches a
ModifierReviewable.OfAbstraction that is abstract . |
static <T extends ByteCodeElement> |
ElementMatchers.isAccessibleTo(Class<?> type)
Matches a
ByteCodeElement that is accessible to a given Class . |
static <T extends ByteCodeElement> |
ElementMatchers.isAccessibleTo(TypeDescription type)
Matches a
ByteCodeElement that is accessible to a given Class . |
static <T extends AnnotationSource> |
ElementMatchers.isAnnotatedWith(Class<? extends Annotation> type)
Matches an
AnnotationSource for declared annotations. |
static <T extends AnnotationSource> |
ElementMatchers.isAnnotatedWith(ElementMatcher<? super TypeDescription> matcher)
Matches an
AnnotationSource for declared annotations. |
static <T extends AnnotationSource> |
ElementMatchers.isAnnotatedWith(TypeDescription type)
Matches an
AnnotationSource for declared annotations. |
static <T extends TypeDescription> |
ElementMatchers.isAnnotation()
Matches a
TypeDescription that is an annotation type. |
static <T extends ClassLoader> |
ElementMatchers.isBootstrapClassLoader()
Matches exactly the bootstrap
ClassLoader . |
static <T extends ModifierReviewable.ForMethodDescription> |
ElementMatchers.isBridge()
Matches a
MethodDescription that is a bridge. |
static <T extends ClassLoader> |
ElementMatchers.isChildOf(ClassLoader classLoader)
Matches any class loader that is either the given class loader or a child of the given class loader.
|
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 TypeDescription.Generic> matcher)
Matches a
ByteCodeElement for being declared by a TypeDescription.Generic that is matched by the given matcher. |
static <T extends ByteCodeElement> |
ElementMatchers.isDeclaredByGeneric(Type type)
Matches a
ByteCodeElement for being declared by a given generic Type . |
static <T extends ByteCodeElement> |
ElementMatchers.isDeclaredByGeneric(TypeDescription.Generic type)
Matches a
ByteCodeElement for being declared by a given TypeDescription.Generic . |
static <T extends MethodDescription> |
ElementMatchers.isDefaultConstructor()
Matches a default constructor, i.e. a constructor without arguments.
|
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 ModifierReviewable.OfEnumeration> |
ElementMatchers.isEnum()
Matches a
ModifierReviewable.OfEnumeration that is an enum or a field holding an enum. |
static <T extends MethodDescription> |
ElementMatchers.isEquals()
Only matches the
Object.equals(Object) method, also if it was overridden. |
static <T extends ClassLoader> |
ElementMatchers.isExtensionClassLoader()
Matches exactly the extension
ClassLoader . |
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.isGenericGetter(ElementMatcher<? super TypeDescription.Generic> matcher)
Matches any Java bean getter method which returns an value with a type matches the supplied matcher.
|
static <T extends MethodDescription> |
ElementMatchers.isGenericGetter(Type type)
Matches any Java bean getter method which returns the given type.
|
static <T extends MethodDescription> |
ElementMatchers.isGenericGetter(TypeDescription.Generic type)
Matches any Java bean getter method which returns the given type.
|
static <T extends MethodDescription> |
ElementMatchers.isGenericSetter(ElementMatcher<? super TypeDescription.Generic> matcher)
Matches any Java bean setter method which takes an argument that matches the supplied matcher.
|
static <T extends MethodDescription> |
ElementMatchers.isGenericSetter(Type type)
Matches any Java bean setter method which takes an argument the given type.
|
static <T extends MethodDescription> |
ElementMatchers.isGenericSetter(TypeDescription.Generic type)
Matches any Java bean setter method which takes an argument the given type.
|
static <T extends MethodDescription> |
ElementMatchers.isGetter()
Matches any Java bean getter method.
|
static <T extends MethodDescription> |
ElementMatchers.isGetter(Class<?> type)
Matches any Java bean getter method which returns the given type.
|
static <T extends MethodDescription> |
ElementMatchers.isGetter(ElementMatcher<? super TypeDescription> matcher)
Matches any Java bean getter method which returns an value with a type matches the supplied matcher.
|
static <T extends MethodDescription> |
ElementMatchers.isGetter(String property)
An element matcher that matches any getter for the given property.
|
static <T extends MethodDescription> |
ElementMatchers.isGetter(TypeDescription 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 ParameterDescription> |
ElementMatchers.isMandated()
Matches a parameter description for a
mandated parameter. |
static <T extends MethodDescription> |
ElementMatchers.isMethod()
Only matches method descriptions that represent a
Method . |
static <T extends NamedElement.WithOptionalName> |
ElementMatchers.isNamed()
Matches a
NamedElement.WithOptionalName for having an explicit name. |
static <T extends ModifierReviewable.ForMethodDescription> |
ElementMatchers.isNative()
Matches a
MethodDescription that is native . |
static <T extends MethodDescription> |
ElementMatchers.isOverriddenFrom(Class<?> type)
Matches any virtual method with a signature that is compatible to a method that is declared the supplied type.
|
static <T extends MethodDescription> |
ElementMatchers.isOverriddenFrom(ElementMatcher<? super TypeDescription> 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.
|
static <T extends MethodDescription> |
ElementMatchers.isOverriddenFrom(TypeDescription type)
Matches any virtual method with a signature that is compatible to a method that is declared the supplied type.
|
static <T extends MethodDescription> |
ElementMatchers.isOverriddenFromGeneric(ElementMatcher<? super TypeDescription.Generic> 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.
|
static <T extends MethodDescription> |
ElementMatchers.isOverriddenFromGeneric(Type type)
Matches any virtual method with a signature that is compatible to a method that is declared the supplied type.
|
static <T extends MethodDescription> |
ElementMatchers.isOverriddenFromGeneric(TypeDescription.Generic type)
Matches any virtual method with a signature that is compatible to a method that is declared the supplied type.
|
static <T extends ModifierReviewable.OfByteCodeElement> |
ElementMatchers.isPackagePrivate()
Matches a
ModifierReviewable that is package-private. |
static <T extends ClassLoader> |
ElementMatchers.isParentOf(ClassLoader classLoader)
Matches any class loader that is either the given class loader or a parent of the given class loader.
|
static <T extends ModifierReviewable.OfByteCodeElement> |
ElementMatchers.isPrivate()
Matches a
ModifierReviewable that is private . |
static <T extends ModifierReviewable.OfByteCodeElement> |
ElementMatchers.isProtected()
Matches a
ModifierReviewable that is protected . |
static <T extends ModifierReviewable.OfByteCodeElement> |
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(Class<?> type)
Matches any Java bean setter method which takes an argument the given type.
|
static <T extends MethodDescription> |
ElementMatchers.isSetter(ElementMatcher<? super TypeDescription> matcher)
Matches any Java bean setter method which takes an argument that matches the supplied matcher.
|
static <T extends MethodDescription> |
ElementMatchers.isSetter(String property)
An element matcher that matches any setter for the given property.
|
static <T extends MethodDescription> |
ElementMatchers.isSetter(TypeDescription type)
Matches any Java bean setter method which takes an argument the given type.
|
static <T extends ModifierReviewable.OfByteCodeElement> |
ElementMatchers.isStatic()
Matches a
ModifierReviewable that is static . |
static <T extends ModifierReviewable.ForMethodDescription> |
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 type)
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 type)
Matches any type description that is a super type of the given type.
|
static <T extends ModifierReviewable.ForMethodDescription> |
ElementMatchers.isSynchronized()
Matches a
MethodDescription that is synchronized . |
static <T extends ModifierReviewable> |
ElementMatchers.isSynthetic()
Matches a
ModifierReviewable that is synthetic. |
static <T extends ClassLoader> |
ElementMatchers.isSystemClassLoader()
Matches exactly the system
ClassLoader . |
static <T extends MethodDescription> |
ElementMatchers.isToString()
Only matches the
Object.toString() method, also if it was overridden. |
static <T extends FieldDescription> |
ElementMatchers.isTransient()
Matches a
transient field. |
static <T extends MethodDescription> |
ElementMatchers.isTypeInitializer()
Only matches method descriptions that represent a
Class type initializer. |
static <T extends ModifierReviewable.ForMethodDescription> |
ElementMatchers.isVarArgs()
Matches a
MethodDescription that is a var-args. |
static <T extends TypeDefinition> |
ElementMatchers.isVariable(ElementMatcher<? super NamedElement> matcher)
Matches a type variable with the given name.
|
static <T extends TypeDefinition> |
ElementMatchers.isVariable(String symbol)
Matches a type variable with the given name.
|
static <T extends MethodDescription> |
ElementMatchers.isVirtual()
Matches any method that is virtual, i.e. non-constructors that are non-static and non-private.
|
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 type)
Matches a
ByteCodeElement that is visible to a given TypeDescription . |
static <T extends FieldDescription> |
ElementMatchers.isVolatile()
Matches a
volatile field. |
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 TypeDefinition> |
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 TypeDefinition> |
ElementMatchers.ofSort(ElementMatcher<? super TypeDefinition.Sort> matcher)
Matches generic type descriptions of the given sort.
|
static <T extends TypeDefinition> |
ElementMatchers.ofSort(TypeDefinition.Sort sort)
Matches generic type descriptions of the given sort.
|
static <T extends ClassLoader> |
ElementMatchers.ofType(ElementMatcher<? super TypeDescription> matcher)
Matches a class loader's type unless it is the bootstrap class loader which is never matched.
|
<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 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 type)
Matches
MethodDescription s that return a given erasure type. |
static <T extends MethodDescription> |
ElementMatchers.returnsGeneric(ElementMatcher<? super TypeDescription.Generic> matcher)
Matches
MethodDescription s that match a matched method's return type. |
static <T extends MethodDescription> |
ElementMatchers.returnsGeneric(Type type)
Matches
MethodDescription s that return a given generic type. |
static <T extends MethodDescription> |
ElementMatchers.returnsGeneric(TypeDescription.Generic type)
Matches
MethodDescription s that returns a given
TypeDescription . |
static <T extends JavaModule> |
ElementMatchers.supportsModules()
Matches a module if it exists, i.e. not
null . |
static <T extends MethodDescription> |
ElementMatchers.takesArgument(int index,
Class<?> type)
Matches
MethodDescription s that define a given generic type as a parameter at the given index. |
static <T extends MethodDescription> |
ElementMatchers.takesArgument(int index,
ElementMatcher<? super TypeDescription> matcher)
Matches
MethodDescription s that define a type erasure as a parameter at the given index that matches the supplied matcher. |
static <T extends MethodDescription> |
ElementMatchers.takesArgument(int index,
TypeDescription type)
Matches
MethodDescription s that define a given type erasure as a parameter at the given index. |
static <T extends MethodDescription> |
ElementMatchers.takesArguments(Class<?>... type)
Matches a method description that takes the provided raw arguments.
|
static <T extends MethodDescription> |
ElementMatchers.takesArguments(ElementMatcher<? super Iterable<? extends TypeDescription>> matchers)
Matches a
MethodDescription by applying an iterable collection of element matcher on any parameter's TypeDescription . |
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> types)
Matches a method description that takes the provided raw arguments.
|
static <T extends MethodDescription> |
ElementMatchers.takesArguments(TypeDescription... type)
Matches a method description that takes the provided raw arguments.
|
static <T extends MethodDescription> |
ElementMatchers.takesGenericArgument(int index,
ElementMatcher<? super TypeDescription.Generic> matcher)
Matches
MethodDescription s that define a given generic type as a parameter at the given index. |
static <T extends MethodDescription> |
ElementMatchers.takesGenericArgument(int index,
Type type)
Matches
MethodDescription s that define a given generic type as a parameter at the given index. |
static <T extends MethodDescription> |
ElementMatchers.takesGenericArgument(int index,
TypeDescription.Generic type)
Matches
MethodDescription s that define a given generic type as a parameter at the given index. |
static <T extends MethodDescription> |
ElementMatchers.takesGenericArguments(ElementMatcher<? super Iterable<? extends TypeDescription.Generic>> matchers)
Matches a
MethodDescription by applying an iterable collection of element matcher on any parameter's TypeDescription.Generic . |
static <T extends MethodDescription> |
ElementMatchers.takesGenericArguments(List<? extends TypeDefinition> types)
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 extends MethodDescription> |
ElementMatchers.takesGenericArguments(TypeDefinition... 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–2017. All rights reserved.