Package | Description |
---|---|
net.bytebuddy.instrumentation.method.matcher |
This package contains types and classes that serve as predicates for
determining if a given
MethodDescription matches a certain criteria. |
Modifier and Type | Class and Description |
---|---|
static class |
JunctionMethodMatcher.AbstractBase
An abstract base implementation of a junction method matcher.
|
static class |
JunctionMethodMatcher.Conjunction
A conjunction implementation of a method matcher that returns
true if both method matchers match
a given method. |
static class |
JunctionMethodMatcher.Disjunction
A disjunction implementation of a method matcher that returns
true if either of two method matchers
matches a given method. |
Modifier and Type | Method and Description |
---|---|
JunctionMethodMatcher |
JunctionMethodMatcher.and(MethodMatcher other)
Creates a new method matcher that returns
true if both this method matcher and the given
method matcher match a given method description. |
JunctionMethodMatcher |
JunctionMethodMatcher.AbstractBase.and(MethodMatcher other) |
static JunctionMethodMatcher |
MethodMatchers.any()
Returns a method matcher that matches any method.
|
static JunctionMethodMatcher |
MethodMatchers.canThrow(Class<? extends Throwable> exceptionType)
Selects a method depending on whether they can throw a specific exception.
|
static JunctionMethodMatcher |
MethodMatchers.canThrow(TypeDescription exceptionType)
Selects a method depending on whether they can throw a specific exception.
|
static JunctionMethodMatcher |
MethodMatchers.hasSameByteCodeSignatureAs(Constructor<?> constructor)
Selects methods with identical signature to the given method description where the return type
is considered to be part of the signature.
|
static JunctionMethodMatcher |
MethodMatchers.hasSameByteCodeSignatureAs(Method method)
Selects methods with identical signature to the given method description where the return type
is considered to be part of the signature.
|
static JunctionMethodMatcher |
MethodMatchers.hasSameByteCodeSignatureAs(MethodDescription methodDescription)
Selects methods with identical signature to the given method description where the return type
is considered to be part of the signature.
|
static JunctionMethodMatcher |
MethodMatchers.hasSameJavaCompilerSignatureAs(Constructor<?> constructor)
Checks if a method has a Java compiler equal signature to another method which includes the name of the method
and the exact types and order of its parameters.
|
static JunctionMethodMatcher |
MethodMatchers.hasSameJavaCompilerSignatureAs(Method method)
Checks if a method has a Java compiler equal signature to another method which includes the name of the method
and the exact types and order of its parameters.
|
static JunctionMethodMatcher |
MethodMatchers.hasSameJavaCompilerSignatureAs(MethodDescription methodDescription)
Checks if a method has a Java compiler equal signature to another method which includes the name of the method
and the exact types and order of its parameters.
|
static JunctionMethodMatcher |
MethodMatchers.is(Constructor<?> constructor)
Selects an exact constructor.
|
static JunctionMethodMatcher |
MethodMatchers.is(Method method)
Selects an exact method.
|
static JunctionMethodMatcher |
MethodMatchers.is(MethodDescription methodDescription)
A method matcher that matches a given method description.
|
static JunctionMethodMatcher |
MethodMatchers.isAnnotatedBy(Class<? extends Annotation> annotationType)
Checks if a method is annotated by a given parameter.
|
static JunctionMethodMatcher |
MethodMatchers.isBridge()
Selects a method when it is marked as a bridge method
|
static JunctionMethodMatcher |
MethodMatchers.isBridgeMethodCompatibleTo(Method method)
Determines if a method could be the target of the given method for a compile time bridge.
|
static JunctionMethodMatcher |
MethodMatchers.isBridgeMethodCompatibleTo(MethodDescription methodDescription)
Determines if a method could be the target of the given method for a compile time bridge.
|
static JunctionMethodMatcher |
MethodMatchers.isConstructor()
Selects methods that are not constructors.
|
static JunctionMethodMatcher |
MethodMatchers.isDeclaredBy(Class<?> type)
Selects method that are declared by a given type.
|
static JunctionMethodMatcher |
MethodMatchers.isDeclaredBy(TypeDescription type)
Selects method that are declared by a given type.
|
static JunctionMethodMatcher |
MethodMatchers.isDefaultFinalizer()
Only matches the default finalizer method as declared in
Object.finalize() but not methods that
override this method. |
static JunctionMethodMatcher |
MethodMatchers.isFinal()
Selects a method when it is
final . |
static JunctionMethodMatcher |
MethodMatchers.isFinalizer()
Matches a method for being a finalizer method which is declared by any class.
|
static JunctionMethodMatcher |
MethodMatchers.isGetter()
Matches methods that represent a Java bean getter, i.e.
|
static JunctionMethodMatcher |
MethodMatchers.isGetter(Class<?> type)
Matches methods that represent a Java bean getter, i.e.
|
static JunctionMethodMatcher |
MethodMatchers.isGetter(TypeDescription type)
Matches methods that represent a Java bean getter, i.e.
|
static JunctionMethodMatcher |
MethodMatchers.isMethod()
Selects methods that are not constructors.
|
static JunctionMethodMatcher |
MethodMatchers.isNative()
Selects a method when it is
native . |
static JunctionMethodMatcher |
MethodMatchers.isOverridable()
Selects methods that are overridable, i.e.
|
static JunctionMethodMatcher |
MethodMatchers.isPackagePrivate()
Selects a method when it is package private, i.e.
|
static JunctionMethodMatcher |
MethodMatchers.isPrivate()
Selects a method when it is
private . |
static JunctionMethodMatcher |
MethodMatchers.isProtected()
Selects a method when it is
protected . |
static JunctionMethodMatcher |
MethodMatchers.isPublic()
Selects a method when it is
public . |
static JunctionMethodMatcher |
MethodMatchers.isSetter()
Matches methods that represent a Java bean setter, i.e.
|
static JunctionMethodMatcher |
MethodMatchers.isSetter(Class<?> type)
Matches methods that represent a Java bean setter, i.e.
|
static JunctionMethodMatcher |
MethodMatchers.isSetter(TypeDescription type)
Matches methods that represent a Java bean setter, i.e.
|
static JunctionMethodMatcher |
MethodMatchers.isStatic()
Selects a method when it is
static . |
static JunctionMethodMatcher |
MethodMatchers.isStrict()
Selects a method when it is
strictfp . |
static JunctionMethodMatcher |
MethodMatchers.isSynchronized()
Selects a method when it is
synchronized . |
static JunctionMethodMatcher |
MethodMatchers.isSynthetic()
Selects a method when it is
synthetic . |
static JunctionMethodMatcher |
MethodMatchers.isVarArgs()
Selects a method when it is defined using a var args argument.
|
static JunctionMethodMatcher |
MethodMatchers.isVisibleTo(Class<?> typeDescription)
Checks if a method is visible for a given type.
|
static JunctionMethodMatcher |
MethodMatchers.isVisibleTo(TypeDescription typeDescription)
Checks if a method is visible for a given type.
|
static JunctionMethodMatcher |
MethodMatchers.nameContains(String infix)
Selects a method by its exact internalName infix.
|
static JunctionMethodMatcher |
MethodMatchers.nameContainsIgnoreCase(String infix)
Selects a method by its case insensitive exact internalName infix.
|
static JunctionMethodMatcher |
MethodMatchers.named(String name)
Selects a method by its exact internalName.
|
static JunctionMethodMatcher |
MethodMatchers.namedIgnoreCase(String name)
Selects a method by its case insensitive, exact internalName.
|
static JunctionMethodMatcher |
MethodMatchers.nameEndsWith(String suffix)
Selects a method by its exact internalName suffix.
|
static JunctionMethodMatcher |
MethodMatchers.nameEndsWithIgnoreCase(String suffix)
Selects a method by its case insensitive exact internalName suffix.
|
static JunctionMethodMatcher |
MethodMatchers.nameMatches(String regex)
Selects a method by its internalName matching a regular expression.
|
static JunctionMethodMatcher |
MethodMatchers.nameStartsWith(String prefix)
Selects a method by its exact internalName prefix.
|
static JunctionMethodMatcher |
MethodMatchers.nameStartsWithIgnoreCase(String prefix)
Selects a method by its case insensitive exact internalName prefix.
|
static JunctionMethodMatcher |
MethodMatchers.none()
Returns a method matcher that matches no method.
|
static JunctionMethodMatcher |
MethodMatchers.not(MethodMatcher methodMatcher)
Inverts another method matcher.
|
JunctionMethodMatcher |
JunctionMethodMatcher.or(MethodMatcher other)
Creates a new method matcher that returns
true if either this method matcher or the given
method matcher match a given method description. |
JunctionMethodMatcher |
JunctionMethodMatcher.AbstractBase.or(MethodMatcher other) |
static JunctionMethodMatcher |
MethodMatchers.returns(Class<?> type)
Selects a method by its exact return type.
|
static JunctionMethodMatcher |
MethodMatchers.returns(TypeDescription type)
Selects a method by its exact return type.
|
static JunctionMethodMatcher |
MethodMatchers.returnsSubtypeOf(Class<?> type)
Selects a method by its return type where only methods are matched that return a subtype of the given
type, including the given type itself.
|
static JunctionMethodMatcher |
MethodMatchers.returnsSubtypeOf(TypeDescription type)
Selects a method by its return type where only methods are matched that return a subtype of the given
type, including the given type itself.
|
static JunctionMethodMatcher |
MethodMatchers.returnsSupertypeOf(Class<?> type)
Selects a method by its return type where only methods are matched that return a super type of the given
type, including the given type itself.
|
static JunctionMethodMatcher |
MethodMatchers.returnsSupertypeOf(TypeDescription type)
Selects a method by its return type where only methods are matched that return a super type of the given
type, including the given type itself.
|
static JunctionMethodMatcher |
MethodMatchers.takesArguments(Class<?>... types)
Selects a method by its exact parameter types in their exact order.
|
static JunctionMethodMatcher |
MethodMatchers.takesArguments(int number)
Selects a method by the number of its parameters.
|
static JunctionMethodMatcher |
MethodMatchers.takesArguments(List<? extends TypeDescription> types)
Selects a method by its exact parameter types in their exact order.
|
static JunctionMethodMatcher |
MethodMatchers.takesArguments(TypeDescription... types)
Selects a method by its exact parameter types in their exact order.
|
static JunctionMethodMatcher |
MethodMatchers.takesArgumentsAsSubtypesOf(Class<?>... types)
Selects a method by its parameter types in their exact order where only parameter types are matched
that are subtypes of the given types, including the given type.
|
static JunctionMethodMatcher |
MethodMatchers.takesArgumentsAsSubtypesOf(List<? extends TypeDescription> types)
Selects a method by its parameter types in their exact order where only parameter types are matched
that are subtypes of the given types, including the given type.
|
static JunctionMethodMatcher |
MethodMatchers.takesArgumentsAsSubtypesOf(TypeDescription... types)
Selects a method by its parameter types in their exact order where only parameter types are matched
that are subtypes of the given types, including the given type.
|
static JunctionMethodMatcher |
MethodMatchers.takesArgumentsAsSuperTypesOf(Class<?>... types)
Selects a method by its parameter types in their exact order where only parameter types are matched
that are super types of the given types, including the given type.
|
static JunctionMethodMatcher |
MethodMatchers.takesArgumentsAsSuperTypesOf(List<? extends TypeDescription> types)
Selects a method by its parameter types in their exact order where only parameter types are matched
that are super types of the given types, including the given type.
|
static JunctionMethodMatcher |
MethodMatchers.takesArgumentsAsSuperTypesOf(TypeDescription... types)
Selects a method by its parameter types in their exact order where only parameter types are matched
that are super types of the given types, including the given type.
|
Copyright © 2014. All rights reserved.