Package | Description |
---|---|
net.bytebuddy |
Byte Buddy is a library for creating Java classes at runtime of a Java program.
|
net.bytebuddy.agent.builder |
An agent builder is used to easily implement load-time class-transformations using a Java agent.
|
net.bytebuddy.asm |
The ASM package contains classes that are meant for direct interaction with the ASM API.
|
net.bytebuddy.description |
Classes of this package allow the representation of Java classes, their member and their meta data.
|
net.bytebuddy.description.annotation |
Contains descriptions of annotations and annotation values.
|
net.bytebuddy.description.field |
Contains descriptions of Java fields.
|
net.bytebuddy.description.method |
Contains descriptions of Java methods and constructors as well as their parameters.
|
net.bytebuddy.description.type |
Contains descriptions of Java types and packages.
|
net.bytebuddy.dynamic |
This package contains classes and interfaces that are connected to writing the byte stream that represents a Java
type that is dynamically created and for loading this type into a running JVM process.
|
net.bytebuddy.dynamic.loading |
This package contains classes that are responsible for class loading of classes that are represented by
byte arrays. |
net.bytebuddy.dynamic.scaffold |
This package contains helper types and implementations that are responsible for the actual writing of a byte array
representing a Java class.
|
net.bytebuddy.dynamic.scaffold.inline |
All classes and types in this package are related to creating a
DynamicType by
enhancing a given type. |
net.bytebuddy.dynamic.scaffold.subclass |
All classes and types in this package are related to creating a
DynamicType by
creating a subclass of a given type. |
net.bytebuddy.implementation |
The implementation package contains any logic for intercepting method calls.
|
net.bytebuddy.matcher |
Contains an API for matching Java byte code entities.
|
Modifier and Type | Method and Description |
---|---|
ByteBuddy |
ByteBuddy.ignore(ElementMatcher<? super MethodDescription> ignoredMethods)
Creates a new configuration where any
MethodDescription that matches the provided method matcher is excluded
from instrumentation. |
Modifier and Type | Method and Description |
---|---|
AgentBuilder.Identified |
AgentBuilder.type(ElementMatcher<? super TypeDescription> typeMatcher)
Matches a type being loaded in order to apply the supplied
AgentBuilder.Transformer s before loading this type. |
AgentBuilder.Identified |
AgentBuilder.Default.type(ElementMatcher<? super TypeDescription> typeMatcher) |
AgentBuilder.Identified |
AgentBuilder.Default.Matched.type(ElementMatcher<? super TypeDescription> typeMatcher) |
AgentBuilder.Identified |
AgentBuilder.type(ElementMatcher<? super TypeDescription> typeMatcher,
ElementMatcher<? super ClassLoader> classLoaderMatcher)
Matches a type being loaded in order to apply the supplied
AgentBuilder.Transformer s before loading this type. |
AgentBuilder.Identified |
AgentBuilder.type(ElementMatcher<? super TypeDescription> typeMatcher,
ElementMatcher<? super ClassLoader> classLoaderMatcher)
Matches a type being loaded in order to apply the supplied
AgentBuilder.Transformer s before loading this type. |
AgentBuilder.Identified |
AgentBuilder.Default.type(ElementMatcher<? super TypeDescription> typeMatcher,
ElementMatcher<? super ClassLoader> classLoaderMatcher) |
AgentBuilder.Identified |
AgentBuilder.Default.type(ElementMatcher<? super TypeDescription> typeMatcher,
ElementMatcher<? super ClassLoader> classLoaderMatcher) |
AgentBuilder.Identified |
AgentBuilder.Default.Matched.type(ElementMatcher<? super TypeDescription> typeMatcher,
ElementMatcher<? super ClassLoader> classLoaderMatcher) |
AgentBuilder.Identified |
AgentBuilder.Default.Matched.type(ElementMatcher<? super TypeDescription> typeMatcher,
ElementMatcher<? super ClassLoader> classLoaderMatcher) |
Constructor and Description |
---|
ForElementMatcherPair(ElementMatcher<? super TypeDescription> typeMatcher,
ElementMatcher<? super ClassLoader> classLoaderMatcher)
Creates a new
AgentBuilder.RawMatcher that only matches the
supplied TypeDescription and its ClassLoader against two matcher in order
to decided if an instrumentation should be conducted. |
ForElementMatcherPair(ElementMatcher<? super TypeDescription> typeMatcher,
ElementMatcher<? super ClassLoader> classLoaderMatcher)
Creates a new
AgentBuilder.RawMatcher that only matches the
supplied TypeDescription and its ClassLoader against two matcher in order
to decided if an instrumentation should be conducted. |
Modifier and Type | Class and Description |
---|---|
protected static class |
AsmVisitorWrapper.ForDeclaredFields.Entry
An entry describing a field visitor wrapper paired with a matcher for fields to be wrapped.
|
protected static class |
AsmVisitorWrapper.ForDeclaredMethods.Entry
An entry describing a method visitor wrapper paired with a matcher for fields to be wrapped.
|
Modifier and Type | Method and Description |
---|---|
AsmVisitorWrapper.ForDeclaredFields |
AsmVisitorWrapper.ForDeclaredFields.field(ElementMatcher<? super FieldDescription.InDefinedShape> matcher,
AsmVisitorWrapper.ForDeclaredFields.FieldVisitorWrapper fieldVisitorWrapper)
Defines a new field visitor wrapper to be applied if the given field matcher is matched.
|
AsmVisitorWrapper.ForDeclaredMethods |
AsmVisitorWrapper.ForDeclaredMethods.method(ElementMatcher<? super MethodDescription.InDefinedShape> matcher,
AsmVisitorWrapper.ForDeclaredMethods.MethodVisitorWrapper methodVisitorWrapper)
Defines a new method visitor wrapper to be applied if the given method matcher is matched.
|
Constructor and Description |
---|
Entry(ElementMatcher<? super FieldDescription.InDefinedShape> matcher,
AsmVisitorWrapper.ForDeclaredFields.FieldVisitorWrapper fieldVisitorWrapper)
Creates a new entry.
|
Entry(ElementMatcher<? super MethodDescription.InDefinedShape> matcher,
AsmVisitorWrapper.ForDeclaredMethods.MethodVisitorWrapper methodVisitorWrapper)
Creates a new entry.
|
Modifier and Type | Method and Description |
---|---|
S |
ByteCodeElement.TypeDependant.asToken(ElementMatcher<? super TypeDescription> matcher)
Returns a token representative of this type dependant.
|
Modifier and Type | Method and Description |
---|---|
AnnotationList |
AnnotationList.visibility(ElementMatcher<? super RetentionPolicy> matcher)
Only retains annotations with the given retention policy.
|
AnnotationList |
AnnotationList.AbstractBase.visibility(ElementMatcher<? super RetentionPolicy> matcher) |
AnnotationList |
AnnotationList.Empty.visibility(ElementMatcher<? super RetentionPolicy> matcher) |
Modifier and Type | Method and Description |
---|---|
FieldDescription.Token |
FieldDescription.AbstractBase.asToken(ElementMatcher<? super TypeDescription> matcher) |
ByteCodeElement.Token.TokenList<FieldDescription.Token> |
FieldList.asTokenList(ElementMatcher<? super TypeDescription> matcher)
Transforms the list of field descriptions into a list of detached tokens.
|
ByteCodeElement.Token.TokenList<FieldDescription.Token> |
FieldList.AbstractBase.asTokenList(ElementMatcher<? super TypeDescription> matcher) |
ByteCodeElement.Token.TokenList<FieldDescription.Token> |
FieldList.Empty.asTokenList(ElementMatcher<? super TypeDescription> matcher) |
Modifier and Type | Method and Description |
---|---|
ByteCodeElement.Token.TokenList<TypeVariableToken> |
TypeList.Generic.asTokenList(ElementMatcher<? super TypeDescription> visitor)
Transforms a list of attached type variables into their tokenized form.
|
ByteCodeElement.Token.TokenList<TypeVariableToken> |
TypeList.Generic.AbstractBase.asTokenList(ElementMatcher<? super TypeDescription> matcher) |
ByteCodeElement.Token.TokenList<TypeVariableToken> |
TypeList.Generic.Empty.asTokenList(ElementMatcher<? super TypeDescription> matcher) |
static TypeVariableToken |
TypeVariableToken.of(TypeDescription.Generic typeVariable,
ElementMatcher<? super TypeDescription> matcher)
Transforms a type variable into a type variable token with its bounds detached.
|
Constructor and Description |
---|
ForDetachment(ElementMatcher<? super TypeDescription> typeMatcher)
Creates a visitor for detaching a type.
|
Modifier and Type | Method and Description |
---|---|
DynamicType.Builder.MethodDefinition.ImplementationDefinition<T> |
DynamicType.Builder.constructor(ElementMatcher<? super MethodDescription> matcher)
Matches a constructor that is already declared by the instrumented type.
|
DynamicType.Builder.MethodDefinition.ImplementationDefinition<S> |
DynamicType.Builder.AbstractBase.constructor(ElementMatcher<? super MethodDescription> matcher) |
DynamicType.Builder.FieldDefinition.Valuable<T> |
DynamicType.Builder.field(ElementMatcher<? super FieldDescription> matcher)
Matches a field that is already declared by the instrumented type.
|
DynamicType.Builder.FieldDefinition.Valuable<S> |
DynamicType.Builder.AbstractBase.field(ElementMatcher<? super FieldDescription> matcher) |
DynamicType.Builder<T> |
DynamicType.Builder.ignoreAlso(ElementMatcher<? super MethodDescription> ignoredMethods)
Specifies to exclude any method that is matched by the supplied matcher from instrumentation.
|
DynamicType.Builder<S> |
DynamicType.Builder.AbstractBase.ignoreAlso(ElementMatcher<? super MethodDescription> ignoredMethods) |
DynamicType.Builder<U> |
DynamicType.Builder.AbstractBase.Delegator.ignoreAlso(ElementMatcher<? super MethodDescription> ignoredMethods) |
DynamicType.Builder.MethodDefinition.ImplementationDefinition<T> |
DynamicType.Builder.invokable(ElementMatcher<? super MethodDescription> matcher)
Matches a method or constructor that is already declared or inherited by the instrumented type.
|
DynamicType.Builder.MethodDefinition.ImplementationDefinition<S> |
DynamicType.Builder.AbstractBase.invokable(ElementMatcher<? super MethodDescription> matcher) |
DynamicType.Builder.MethodDefinition.ImplementationDefinition<T> |
DynamicType.Builder.method(ElementMatcher<? super MethodDescription> matcher)
Matches a method that is already declared or inherited by the instrumented type.
|
DynamicType.Builder.MethodDefinition.ImplementationDefinition<S> |
DynamicType.Builder.AbstractBase.method(ElementMatcher<? super MethodDescription> matcher) |
Modifier and Type | Method and Description |
---|---|
MultipleParentClassLoader.Builder |
MultipleParentClassLoader.Builder.filter(ElementMatcher<? super ClassLoader> matcher)
Removes all class loaders that match the given filter.
|
Modifier and Type | Class and Description |
---|---|
protected static class |
FieldRegistry.Default.Compiled.Entry
An entry of a compiled field registry.
|
Modifier and Type | Method and Description |
---|---|
ElementMatcher<? super MethodDescription> |
MethodRegistry.Default.Entry.resolve(TypeDescription instrumentedType) |
ElementMatcher<? super FieldDescription> |
FieldRegistry.Default.Entry.resolve(TypeDescription instrumentedType) |
Modifier and Type | Method and Description |
---|---|
protected MethodGraph.Compiler.Default.Key.Store<T> |
MethodGraph.Compiler.Default.analyze(TypeDefinition typeDefinition,
Map<TypeDefinition,MethodGraph.Compiler.Default.Key.Store<T>> snapshots,
ElementMatcher<? super MethodDescription> relevanceMatcher)
Analyzes the given type description without checking if the end of the type hierarchy was reached.
|
protected MethodGraph.Compiler.Default.Key.Store<T> |
MethodGraph.Compiler.Default.analyzeNullable(TypeDefinition typeDefinition,
Map<TypeDefinition,MethodGraph.Compiler.Default.Key.Store<T>> snapshots,
ElementMatcher<? super MethodDescription> relevanceMatcher)
Analyzes the given type description.
|
protected MethodGraph.Compiler.Default.Key.Store<T> |
MethodGraph.Compiler.Default.doAnalyze(TypeDefinition typeDefinition,
Map<TypeDefinition,MethodGraph.Compiler.Default.Key.Store<T>> snapshots,
ElementMatcher<? super MethodDescription> relevanceMatcher)
Analyzes the given type description without checking if it is already presented in the key store.
|
Constructor and Description |
---|
Entry(ElementMatcher<? super FieldDescription> matcher,
FieldAttributeAppender fieldAttributeAppender,
Object defaultValue,
FieldTransformer fieldTransformer)
Creates a new entry.
|
Modifier and Type | Class and Description |
---|---|
protected static class |
RebaseDynamicTypeBuilder.RebaseableMatcher
A matcher that filters any method that should not be rebased, i.e. that is not already defined by the original type.
|
Modifier and Type | Method and Description |
---|---|
protected static ElementMatcher<MethodDescription> |
RebaseDynamicTypeBuilder.RebaseableMatcher.of(TypeDescription instrumentedType,
MethodList<?> instrumentedMethods)
Returns a matcher that filters any method that should not be rebased.
|
ElementMatcher<? super MethodDescription> |
InliningImplementationMatcher.resolve(TypeDescription instrumentedType) |
Constructor and Description |
---|
InliningImplementationMatcher(LatentMatcher<? super MethodDescription> ignoredMethods,
ElementMatcher<? super MethodDescription> predefinedMethodSignatures)
Creates a new inline implementation matcher.
|
Modifier and Type | Method and Description |
---|---|
ElementMatcher<? super MethodDescription> |
SubclassDynamicTypeBuilder.InstrumentableMatcher.resolve(TypeDescription instrumentedType) |
Modifier and Type | Method and Description |
---|---|
MethodDelegation |
MethodDelegation.filter(ElementMatcher<? super MethodDescription> methodMatcher)
Applies a filter to target methods that are eligible for delegation.
|
MethodDelegation.MethodContainer |
MethodDelegation.MethodContainer.filter(ElementMatcher<? super MethodDescription> matcher)
Appends a filter that is applied to the methods that this container represents.
|
MethodDelegation.MethodContainer |
MethodDelegation.MethodContainer.ForExplicitMethods.filter(ElementMatcher<? super MethodDescription> matcher) |
MethodDelegation.MethodContainer |
MethodDelegation.MethodContainer.ForVirtualMethods.filter(ElementMatcher<? super MethodDescription> matcher) |
Modifier and Type | Interface and Description |
---|---|
static interface |
ElementMatcher.Junction<S>
A junctions allows to chain different
ElementMatcher s in a readable manner. |
Modifier and Type | Class and Description |
---|---|
class |
AnnotationTypeMatcher<T extends AnnotationDescription>
An element matcher that matches the type of an annotation description.
|
class |
BooleanMatcher<T>
An element matcher that returns a fixed result.
|
class |
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 |
CollectionItemMatcher<T>
A list item matcher matches any element of a collection to a given matcher and assures that at least one
element matches the supplied iterable condition.
|
class |
CollectionOneToOneMatcher<T>
An element matcher that matches a given iterable collection to a list of matchers on a per-element basis.
|
class |
CollectionRawTypeMatcher<T extends Iterable<? extends TypeDefinition>>
An element matcher that matches a collection of types by their raw types.
|
class |
CollectionSizeMatcher<T extends Iterable<?>>
An element matcher that matches a collection by its size.
|
class |
DeclaringAnnotationMatcher<T extends AnnotatedCodeElement>
An element matcher that matches the list of annotations that are provided by an annotated element.
|
class |
DeclaringFieldMatcher<T extends 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 |
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 |
InheritedAnnotationMatcher<T extends TypeDescription>
An element matcher that matches the list of inherited annotations of a type description.
|
protected static class |
LatentMatcher.ForFieldToken.ResolvedMatcher
A resolved matcher of a latent field matcher for a field token.
|
protected static class |
LatentMatcher.ForMethodToken.ResolvedMatcher
A resolved matcher of a latent method matcher for a method token.
|
class |
MethodExceptionTypeMatcher<T extends MethodDescription>
An element matcher that matches the exceptions that are declared by a method.
|
class |
MethodParametersMatcher<T extends MethodDescription>
An element matcher that matches a method's parameters.
|
class |
MethodParameterTypeMatcher<T extends ParameterDescription>
An element matcher that matches a method's parameter's type.
|
class |
MethodParameterTypesMatcher<T extends ParameterList<?>>
An element matcher that matches a method's parameter types.
|
class |
MethodReturnTypeMatcher<T extends MethodDescription>
An element matcher that matches its argument's return type against a given type matcher.
|
class |
MethodSortMatcher<T extends MethodDescription>
Matches a method description by its general characteristics which are represented as a
MethodSortMatcher.Sort . |
class |
ModifierMatcher<T extends ModifierReviewable>
An element matcher that matches a byte code element by its modifiers.
|
class |
NameMatcher<T extends NamedElement>
A method matcher that matches a byte code element's source code name:
The source code name of types is equal to their binary name where arrays are appended a
[] by
their arity and where inner classes are appended by dots to their outer class's source name. |
class |
NegatingMatcher<T>
An element matcher that reverses the matching result of another matcher.
|
class |
NullMatcher<T>
An element matcher that matches the
null value. |
class |
RawTypeMatcher<T extends TypeDefinition>
An element matcher that matches its argument's
TypeDescription.Generic raw type against the
given matcher for a TypeDescription . |
class |
StringMatcher
An element matcher that compares two strings by a given pattern which is characterized by a
StringMatcher.Mode . |
class |
SubTypeMatcher<T extends TypeDescription>
An element matcher that matches its argument for being another type's subtype.
|
class |
SuperTypeMatcher<T extends TypeDescription>
An element matcher that matches its argument for being another type's super type.
|
class |
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 |
---|---|
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 ClassLoader> |
ElementMatchers.isBootstrapClassLoader()
Matches exactly the bootstrap
ClassLoader . |
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 ClassLoader> |
ElementMatchers.isExtensionClassLoader()
Matches exactly the extension
ClassLoader . |
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 ClassLoader> |
ElementMatchers.isSystemClassLoader()
Matches exactly the system
ClassLoader . |
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.
|
ElementMatcher<? super T> |
LatentMatcher.resolve(TypeDescription instrumentedType)
Resolves the element matcher this instance represents for the instrumented type.
|
ElementMatcher<? super S> |
LatentMatcher.Resolved.resolve(TypeDescription instrumentedType) |
ElementMatcher<? super FieldDescription> |
LatentMatcher.ForFieldToken.resolve(TypeDescription instrumentedType) |
ElementMatcher<? super MethodDescription> |
LatentMatcher.ForMethodToken.resolve(TypeDescription instrumentedType) |
ElementMatcher<? super S> |
LatentMatcher.Compound.resolve(TypeDescription instrumentedType) |
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 AnnotatedCodeElement> |
ElementMatchers.declaresAnnotation(ElementMatcher<? super AnnotationDescription> matcher)
Matches an
AnnotatedCodeElement to declare any annotation
that matches the given matcher. |
static <T extends TypeDefinition> |
ElementMatchers.declaresField(ElementMatcher<? super FieldDescription> fieldMatcher)
Matches a type by a another matcher that is applied on any of its declared fields.
|
static <T extends MethodDescription> |
ElementMatchers.declaresGenericException(ElementMatcher<? super Iterable<? extends TypeDescription.Generic>> exceptionMatcher)
Matches a method's generic exception types against the provided matcher.
|
static <T extends TypeDefinition> |
ElementMatchers.declaresMethod(ElementMatcher<? super MethodDescription> methodMatcher)
Matches a type by a another matcher that is applied on any of its declared methods.
|
static <T extends FieldDescription> |
ElementMatchers.definedField(ElementMatcher<? super FieldDescription.InDefinedShape> matcher)
Matches a field in its defined shape.
|
static <T extends MethodDescription> |
ElementMatchers.definedMethod(ElementMatcher<? super MethodDescription.InDefinedShape> matcher)
Matches a method in its defined shape.
|
static <T extends ParameterDescription> |
ElementMatchers.definedParameter(ElementMatcher<? super ParameterDescription.InDefinedShape> matcher)
Matches a parameter in its defined shape.
|
static <T> ElementMatcher.Junction<T> |
ElementMatchers.failSafe(ElementMatcher<? super T> elementMatcher)
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(ElementMatcher<? super TypeDescription> matcher)
Matches a field's raw type against the provided matcher.
|
S |
FilterableList.filter(ElementMatcher<? super T> elementMatcher)
Filters any elements in this lists by the given
elementMatcher and returns a list that are matched
by the given matcher. |
S |
FilterableList.Empty.filter(ElementMatcher<? super T> elementMatcher) |
S |
FilterableList.AbstractBase.filter(ElementMatcher<? super T> elementMatcher) |
static <T extends FieldDescription> |
ElementMatchers.genericFieldType(ElementMatcher<? super TypeDescription.Generic> matcher)
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 ParameterDescription> |
ElementMatchers.hasGenericType(ElementMatcher<? super TypeDescription.Generic> matcher)
Matches a method parameter by its generic type.
|
static <T extends MethodDescription> |
ElementMatchers.hasParameters(ElementMatcher<? super Iterable<? extends ParameterDescription>> matcher)
Matches a
MethodDescription by validating that its parameters
fulfill a given constraint. |
static <T extends ParameterDescription> |
ElementMatchers.hasType(ElementMatcher<? super TypeDescription> matcher)
Matches a parameter's type by the given matcher.
|
static <T extends TypeDescription> |
ElementMatchers.inheritsAnnotation(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 AnnotatedCodeElement> |
ElementMatchers.isAnnotatedWith(ElementMatcher<? super TypeDescription> matcher)
Matches an
AnnotatedCodeElement for declared annotations. |
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.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 MethodDescription> |
ElementMatchers.isGetter(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.isSetter(ElementMatcher<? super TypeDescription.Generic> matcher)
Matches any Java bean setter method which takes an argument that matches the supplied matcher.
|
static <T extends TypeDefinition> |
ElementMatchers.isVariable(ElementMatcher<? super NamedElement> matcher)
Matches a type variable with the given name.
|
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.
|
<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 TypeDescription.Generic> |
ElementMatchers.rawType(ElementMatcher<? super TypeDescription> matcher)
Converts a matcher for a type description into a matcher for a raw type of the matched generic type against the given matcher.
|
static <T extends Iterable<? extends TypeDescription.Generic>> |
ElementMatchers.rawTypes(ElementMatcher<? super Iterable<? extends TypeDescription>> matcher)
Applies the provided matcher to an iteration og generic types' generic types.
|
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.returnsGeneric(ElementMatcher<? super TypeDescription.Generic> matcher)
Matches
MethodDescription s that matches a matched method's return type. |
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 . |
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.
|
Constructor and Description |
---|
AnnotationTypeMatcher(ElementMatcher<? super TypeDescription> typeMatcher)
Creates a new matcher for an annotation description's type.
|
ClassLoaderHierarchyMatcher(ElementMatcher<? super ClassLoader> classLoaderMatcher)
Creates a new class loader hierarchy matcher.
|
CollectionItemMatcher(ElementMatcher<? super T> elementMatcher)
Creates a new matcher that applies another matcher to each element of a matched iterable collection.
|
CollectionRawTypeMatcher(ElementMatcher<? super Iterable<? extends TypeDescription>> matcher)
Creates a new raw type matcher.
|
Conjunction(ElementMatcher<? super W> left,
ElementMatcher<? super W> right)
Creates a new conjunction matcher.
|
Conjunction(ElementMatcher<? super W> left,
ElementMatcher<? super W> right)
Creates a new conjunction matcher.
|
DeclaringAnnotationMatcher(ElementMatcher<? super AnnotationList> annotationMatcher)
Creates a new matcher for the annotations of an annotated element.
|
DeclaringFieldMatcher(ElementMatcher<? super FieldList<? extends FieldDescription>> fieldMatcher)
Creates a new matcher for a type's declared fields.
|
DeclaringMethodMatcher(ElementMatcher<? super MethodList<? extends MethodDescription>> methodMatcher)
Creates a new matcher for a type's declared methods.
|
DeclaringTypeMatcher(ElementMatcher<? super TypeDescription.Generic> typeMatcher)
Creates a new matcher for the declaring type of an element.
|
DefinedShapeMatcher(ElementMatcher<? super S> matcher)
Creates a new matcher for a byte code element's defined shape.
|
DescriptorMatcher(ElementMatcher<String> descriptorMatcher)
Creates a new matcher for an element's descriptor.
|
Disjunction(ElementMatcher<? super W> left,
ElementMatcher<? super W> right)
Creates a new disjunction matcher.
|
Disjunction(ElementMatcher<? super W> left,
ElementMatcher<? super W> right)
Creates a new disjunction matcher.
|
FailSafeMatcher(ElementMatcher<? super T> delegate,
boolean fallback)
Creates a new fail-safe element matcher.
|
FieldTypeMatcher(ElementMatcher<? super TypeDescription.Generic> typeMatcher)
Creates a new matcher for a matched field's type.
|
InheritedAnnotationMatcher(ElementMatcher<? super AnnotationList> annotationMatcher)
Creates a new matcher for the inherited annotations of a type description.
|
MethodExceptionTypeMatcher(ElementMatcher<? super TypeList.Generic> exceptionMatcher)
Creates a new matcher for a method's exceptions.
|
MethodParametersMatcher(ElementMatcher<? super ParameterList<? extends ParameterDescription>> parameterMatcher)
Creates a new matcher for a method's parameters.
|
MethodParameterTypeMatcher(ElementMatcher<? super TypeDescription.Generic> matcher)
Creates a new matcher for a method's parameter's type.
|
MethodParameterTypesMatcher(ElementMatcher<? super List<? extends TypeDescription.Generic>> matcher)
Creates a new matcher for a method's parameter types.
|
MethodReturnTypeMatcher(ElementMatcher<? super TypeDescription.Generic> typeMatcher)
Creates a new matcher for a matched element's return type.
|
NameMatcher(ElementMatcher<String> nameMatcher)
Creates a new matcher for a byte code element's source name.
|
NegatingMatcher(ElementMatcher<? super T> negatedMatcher)
Creates a new negating element matcher.
|
RawTypeMatcher(ElementMatcher<? super TypeDescription> rawTypeMatcher)
Creates a new raw type matcher.
|
Resolved(ElementMatcher<? super S> matcher)
Creates a new resolved latent matcher.
|
TypeSortMatcher(ElementMatcher<? super TypeDefinition.Sort> matcher)
Creates a new type sort matcher.
|
Constructor and Description |
---|
CollectionOneToOneMatcher(List<? extends ElementMatcher<? super T>> elementMatchers)
Creates a new matcher that compares a matched iterable collection against a list of element matchers.
|
Copyright © 2014–2016. All rights reserved.