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.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.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.instrumentation |
The instrumentation package contains any logic for intercepting method calls.
|
net.bytebuddy.matcher |
Contains an API for matching Java byte code entities.
|
Modifier and Type | Field and Description |
---|---|
protected ElementMatcher<? super MethodDescription> |
ByteBuddy.ignoredMethods
A matcher for identifying methods that should never be intercepted.
|
protected ElementMatcher<? super MethodDescription> |
ByteBuddy.MethodAnnotationTarget.methodMatcher
The method matcher representing the current method selection.
|
protected ElementMatcher<? super MethodDescription> |
ByteBuddy.OptionalMethodInterception.methodMatcher
The method matcher that defines the selected that is represented by this instance.
|
protected ElementMatcher<? super MethodDescription> |
ByteBuddy.MatchedMethodInterception.methodMatcher
A method matcher that represents the current method selection.
|
Modifier and Type | Method and Description |
---|---|
ElementMatcher<? super MethodDescription> |
ByteBuddy.getIgnoredMethods()
Returns the matcher for the ignored methods for the current configuration.
|
ElementMatcher<? super MethodDescription> |
ByteBuddy.Proxy.getIgnoredMethods() |
Modifier and Type | Method and Description |
---|---|
ByteBuddy.MatchedMethodInterception |
ByteBuddy.constructor(ElementMatcher<? super MethodDescription> methodMatcher)
Intercepts a given constructor selection.
|
ByteBuddy.MatchedMethodInterception |
ByteBuddy.Proxy.constructor(ElementMatcher<? super MethodDescription> methodMatcher) |
ByteBuddy.MatchedMethodInterception |
ByteBuddy.invokable(ElementMatcher<? super MethodDescription> methodMatcher)
Intercepts a given selection of byte code methods that can be a method or a constructor.
|
ByteBuddy.MatchedMethodInterception |
ByteBuddy.Proxy.invokable(ElementMatcher<? super MethodDescription> methodMatcher) |
ByteBuddy.MatchedMethodInterception |
ByteBuddy.method(ElementMatcher<? super MethodDescription> methodMatcher)
Intercepts a given method selection.
|
ByteBuddy.MatchedMethodInterception |
ByteBuddy.Proxy.method(ElementMatcher<? super MethodDescription> methodMatcher) |
ByteBuddy |
ByteBuddy.withIgnoredMethods(ElementMatcher<? super MethodDescription> ignoredMethods)
Defines a new method matcher for methods that are ignored by any dynamic type that is created by this
configuration which will replace the current configuration.
|
ByteBuddy |
ByteBuddy.Proxy.withIgnoredMethods(ElementMatcher<? super MethodDescription> ignoredMethods) |
Constructor and Description |
---|
ByteBuddy(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
MethodRegistry methodRegistry,
ByteBuddy.Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory)
Defines a new
ByteBuddy configuration. |
MatchedMethodInterception(ElementMatcher<? super MethodDescription> methodMatcher)
Creates a new matched method interception.
|
MethodAnnotationTarget(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
MethodRegistry methodRegistry,
ByteBuddy.Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
ElementMatcher<? super MethodDescription> methodMatcher,
Instrumentation instrumentation,
MethodAttributeAppender.Factory attributeAppenderFactory)
Creates a new method annotation target.
|
MethodAnnotationTarget(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
MethodRegistry methodRegistry,
ByteBuddy.Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
ElementMatcher<? super MethodDescription> methodMatcher,
Instrumentation instrumentation,
MethodAttributeAppender.Factory attributeAppenderFactory)
Creates a new method annotation target.
|
OptionalMethodInterception(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
MethodRegistry methodRegistry,
ByteBuddy.Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
ElementMatcher<? super MethodDescription> methodMatcher)
Creates a new optional method interception.
|
OptionalMethodInterception(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
MethodRegistry methodRegistry,
ByteBuddy.Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
ElementMatcher<? super MethodDescription> methodMatcher)
Creates a new optional method interception.
|
Proxy(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
MethodRegistry methodRegistry,
ByteBuddy.Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory)
Defines a new proxy configuration for
ByteBuddy . |
Modifier and Type | Method and Description |
---|---|
AgentBuilder.Identified |
AgentBuilder.rebase(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.rebase(ElementMatcher<? super TypeDescription> typeMatcher) |
AgentBuilder.Identified |
AgentBuilder.Default.Matched.rebase(ElementMatcher<? super TypeDescription> typeMatcher) |
AgentBuilder.Identified |
AgentBuilder.rebase(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.rebase(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.rebase(ElementMatcher<? super TypeDescription> typeMatcher,
ElementMatcher<? super ClassLoader> classLoaderMatcher) |
AgentBuilder.Identified |
AgentBuilder.Default.rebase(ElementMatcher<? super TypeDescription> typeMatcher,
ElementMatcher<? super ClassLoader> classLoaderMatcher) |
AgentBuilder.Identified |
AgentBuilder.Default.Matched.rebase(ElementMatcher<? super TypeDescription> typeMatcher,
ElementMatcher<? super ClassLoader> classLoaderMatcher) |
AgentBuilder.Identified |
AgentBuilder.Default.Matched.rebase(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 decied 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 decied if an instrumentation should
be conducted. |
Modifier and Type | Field and Description |
---|---|
protected ElementMatcher<? super MethodDescription> |
DynamicType.Builder.AbstractBase.ignoredMethods
The method matcher for ignored method specified for this builder.
|
Modifier and Type | Method and Description |
---|---|
ElementMatcher<? super MethodDescription> |
DynamicType.Builder.AbstractBase.MethodToken.manifest(TypeDescription instrumentedType) |
Modifier and Type | Method and Description |
---|---|
DynamicType.Builder.MatchedMethodInterception<T> |
DynamicType.Builder.constructor(ElementMatcher<? super MethodDescription> methodMatcher)
Selects a set of constructors of this type for instrumentation.
|
DynamicType.Builder.MatchedMethodInterception<S> |
DynamicType.Builder.AbstractBase.constructor(ElementMatcher<? super MethodDescription> methodMatcher) |
DynamicType.Builder.MatchedMethodInterception<U> |
DynamicType.Builder.AbstractBase.AbstractDelegatingBuilder.constructor(ElementMatcher<? super MethodDescription> methodMatcher) |
DynamicType.Builder<T> |
DynamicType.Builder.ignoreMethods(ElementMatcher<? super MethodDescription> ignoredMethods)
Defines a matcher for methods that will be ignored for any interception attempt.
|
DynamicType.Builder<S> |
DynamicType.Builder.AbstractBase.ignoreMethods(ElementMatcher<? super MethodDescription> ignoredMethods) |
DynamicType.Builder<U> |
DynamicType.Builder.AbstractBase.AbstractDelegatingBuilder.ignoreMethods(ElementMatcher<? super MethodDescription> ignoredMethods) |
DynamicType.Builder.MatchedMethodInterception<T> |
DynamicType.Builder.invokable(ElementMatcher<? super MethodDescription> methodMatcher)
Selects a set of byte code methods of this type for instrumentation.
|
DynamicType.Builder.MatchedMethodInterception<S> |
DynamicType.Builder.AbstractBase.invokable(ElementMatcher<? super MethodDescription> methodMatcher) |
DynamicType.Builder.MatchedMethodInterception<U> |
DynamicType.Builder.AbstractBase.AbstractDelegatingBuilder.invokable(ElementMatcher<? super MethodDescription> methodMatcher) |
protected abstract DynamicType.Builder<S> |
DynamicType.Builder.AbstractBase.materialize(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription targetType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<DynamicType.Builder.AbstractBase.FieldToken> fieldTokens,
List<DynamicType.Builder.AbstractBase.MethodToken> methodTokens)
Creates a new immutable type builder which represents the given arguments.
|
DynamicType.Builder.MatchedMethodInterception<T> |
DynamicType.Builder.method(ElementMatcher<? super MethodDescription> methodMatcher)
Selects a set of methods of this type for instrumentation.
|
DynamicType.Builder.MatchedMethodInterception<S> |
DynamicType.Builder.AbstractBase.method(ElementMatcher<? super MethodDescription> methodMatcher) |
DynamicType.Builder.MatchedMethodInterception<U> |
DynamicType.Builder.AbstractBase.AbstractDelegatingBuilder.method(ElementMatcher<? super MethodDescription> methodMatcher) |
Constructor and Description |
---|
AbstractBase(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription targetType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<DynamicType.Builder.AbstractBase.FieldToken> fieldTokens,
List<DynamicType.Builder.AbstractBase.MethodToken> methodTokens)
Creates a new immutable type builder base implementation.
|
Modifier and Type | Class and Description |
---|---|
protected static class |
MethodRegistry.Default.Compiled.Entry
An entry of a compiled default method registry.
|
protected static class |
MethodRegistry.Default.ListDifferenceMethodMatcher
A method matcher that matches methods that are found in only one of two lists.
|
Modifier and Type | Method and Description |
---|---|
ElementMatcher<? super MethodDescription> |
MethodRegistry.LatentMethodMatcher.manifest(TypeDescription typeDescription)
Manifests a latent method matcher.
|
ElementMatcher<? super MethodDescription> |
MethodRegistry.LatentMethodMatcher.Simple.manifest(TypeDescription instrumentedType) |
ElementMatcher<? super MethodDescription> |
MethodRegistry.Default.ListDifferenceMethodMatcher.manifest(TypeDescription typeDescription) |
Constructor and Description |
---|
Entry(ElementMatcher<? super MethodDescription> methodMatcher,
ByteCodeAppender byteCodeAppender,
MethodAttributeAppender attributeAppender)
Creates an entry of a compiled default method registry.
|
Simple(ElementMatcher<? super MethodDescription> methodMatcher)
Creates a new wrapper.
|
Modifier and Type | Method and Description |
---|---|
protected DynamicType.Builder<T> |
InlineDynamicTypeBuilder.materialize(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription levelType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<DynamicType.Builder.AbstractBase.FieldToken> fieldTokens,
List<DynamicType.Builder.AbstractBase.MethodToken> methodTokens) |
static InlineDynamicTypeBuilder.TargetHandler.Prepared |
InlineDynamicTypeBuilder.TargetHandler.Prepared.ForRebaseInstrumentation.of(ElementMatcher<? super MethodDescription> ignoredMethods,
ClassFileVersion classFileVersion,
TypeDescription instrumentedType,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer)
Creates a target handler for a rebase instrumentation.
|
InlineDynamicTypeBuilder.TargetHandler.Prepared |
InlineDynamicTypeBuilder.TargetHandler.prepare(ElementMatcher<? super MethodDescription> ignoredMethods,
ClassFileVersion classFileVersion,
TypeDescription instrumentedType)
Prepares this target handler to a given set of type creation properties.
|
InlineDynamicTypeBuilder.TargetHandler.Prepared |
InlineDynamicTypeBuilder.TargetHandler.ForRedefinitionInstrumentation.prepare(ElementMatcher<? super MethodDescription> ignoredMethods,
ClassFileVersion classFileVersion,
TypeDescription instrumentedType) |
InlineDynamicTypeBuilder.TargetHandler.Prepared |
InlineDynamicTypeBuilder.TargetHandler.ForRebaseInstrumentation.prepare(ElementMatcher<? super MethodDescription> ignoredMethods,
ClassFileVersion classFileVersion,
TypeDescription instrumentedType) |
Constructor and Description |
---|
Default(ElementMatcher<? super MethodDescription> ignoredMethods,
TypeDescription placeholderType,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer)
Creates a default method rebase resolver.
|
ForRebaseInstrumentation(DynamicType placeholderType,
ElementMatcher<? super MethodDescription> ignoredMethods,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer)
Creates a new prepared target handler for a rebase instrumentation.
|
InlineDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription levelType,
List<? extends TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
ClassFileLocator classFileLocator,
InlineDynamicTypeBuilder.TargetHandler targetHandler)
Creates a new immutable type builder for enhancing a given class.
|
InlineDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription levelType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<DynamicType.Builder.AbstractBase.FieldToken> fieldTokens,
List<DynamicType.Builder.AbstractBase.MethodToken> methodTokens,
ClassFileLocator classFileLocator,
InlineDynamicTypeBuilder.TargetHandler targetHandler)
Creates a new immutable type builder for enhancing a given class.
|
Modifier and Type | Method and Description |
---|---|
protected DynamicType.Builder<T> |
SubclassDynamicTypeBuilder.materialize(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription targetType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<DynamicType.Builder.AbstractBase.FieldToken> fieldTokens,
List<DynamicType.Builder.AbstractBase.MethodToken> methodTokens) |
Constructor and Description |
---|
SubclassDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription superType,
List<? extends TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
ConstructorStrategy constructorStrategy)
Creates a new immutable type builder for a subclassing a given class.
|
SubclassDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
TypeDescription superType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<DynamicType.Builder.AbstractBase.FieldToken> fieldTokens,
List<DynamicType.Builder.AbstractBase.MethodToken> methodTokens,
ConstructorStrategy constructorStrategy)
Creates a new immutable type builder for a subclassing a given class.
|
Modifier and Type | Method and Description |
---|---|
MethodDelegation |
MethodDelegation.filter(ElementMatcher<? super MethodDescription> methodMatcher)
Applies a filter to target methods that are eligible for delegation.
|
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 |
CollectionSizeMatcher<T extends Iterable<?>>
An element matcher that matches a collection by its size.
|
class |
DeclaringAnnotationMatcher<T extends AnnotatedElement>
An element matcher that matches the list of annotations that are provided by an annotated element.
|
class |
DeclaringFieldMatcher<T extends TypeDescription>
An element matcher that checks if a type description declares fields of a given property.
|
class |
DeclaringMethodMatcher<T extends TypeDescription>
An element matcher that checks if a type description declares methods of a given property.
|
class |
DeclaringTypeMatcher<T extends DeclaredInType>
An element matcher that matches the declaring type of another element, only if this element is actually declared
in a type.
|
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 |
InheritedAnnotationMatcher<T extends TypeDescription>
An element matcher that matches the list of inherited annotations of a type description.
|
class |
MethodExceptionTypeMatcher<T extends MethodDescription>
An element matcher that matches the exceptions that are declared by a method.
|
class |
MethodParameterMatcher<T extends MethodDescription>
An element matcher that matches a method's parameters.
|
class |
MethodParameterTypeMatcher<T extends ParameterList>
An element matcher that matches a method's parameter types.
|
class |
MethodReturnTypeMatcher<T extends MethodDescription>
An element matcher that matches its argument's return type against a given type matcher.
|
class |
MethodSortMatcher<T extends MethodDescription>
Matches a method description by its general characteristics which are represented as a
MethodSortMatcher.Sort . |
class |
ModifierMatcher<T extends ModifierReviewable>
An element matcher that matches a byte code element by its modifiers.
|
class |
NameMatcher<T extends NamedElement>
A method matcher that matches a byte code element's source code name:
The source code name of types is equal to their binary name where arrays are appended a
[] by
their arity and where inner classes are appended by dots to their outer class's source name.
Constructors and the type initializer methods are represented by the empty string as they do not
represent a source code name.
Fields are named as in the source code.
|
class |
NegatingMatcher<T>
An element matcher that reverses the matching result of another matcher.
|
class |
NullMatcher<T>
An element matcher that matches the
null value. |
class |
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 |
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 . |
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 AnnotatedElement> |
ElementMatchers.declaresAnnotation(ElementMatcher<? super AnnotationDescription> matcher)
Matches an
AnnotatedElement to declare any annotation
that matches the given matcher. |
static <T extends TypeDescription> |
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 TypeDescription> |
ElementMatchers.declaresMethod(ElementMatcher<? super MethodDescription> methodMatcher)
Matches a type by a another matcher that is applied on any of its declared methods.
|
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 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 MethodDescription> |
ElementMatchers.hasParameter(ElementMatcher<? super ParameterDescription> matcher)
Matches a
MethodDescription by validating that at least one
parameter fullfils a given constraint. |
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 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 AnnotatedElement> |
ElementMatchers.isAnnotatedWith(ElementMatcher<? super TypeDescription> matcher)
Matches an
AnnotatedElement 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 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.isSetter(ElementMatcher<? super TypeDescription> matcher)
Matches any Java bean setter method which takes an argument that matches the supplied matcher.
|
static <T> ElementMatcher.Junction<T> |
ElementMatchers.not(ElementMatcher<? super T> matcher)
Inverts another matcher.
|
<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(ElementMatcher<? super TypeDescription> matcher)
Matches
MethodDescription s that matches a matched method's
return type. |
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.throwing(ElementMatcher<? super List<? extends TypeDescription>> exceptionMatcher)
Matches a
MethodDescription by its declared exceptions. |
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.
|
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> fieldMatcher)
Creates a new matcher for a type's declared fields.
|
DeclaringMethodMatcher(ElementMatcher<? super MethodList> methodMatcher)
Creates a new matcher for a type's declared methods.
|
DeclaringTypeMatcher(ElementMatcher<? super TypeDescription> typeMatcher)
Creates a new matcher for the declaring type of an element.
|
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.
|
InheritedAnnotationMatcher(ElementMatcher<? super AnnotationList> annotationMatcher)
Creates a new matcher for the inherited annotations of a type description.
|
MethodExceptionTypeMatcher(ElementMatcher<? super TypeList> exceptionMatcher)
Creates a new matcher for a method's exceptions.
|
MethodParameterMatcher(ElementMatcher<? super ParameterList> parameterMatcher)
Creates a new matcher for a method's parameters.
|
MethodParameterTypeMatcher(ElementMatcher<? super TypeList> parameterMatcher)
Creates a new matcher for a method's parameter types.
|
MethodReturnTypeMatcher(ElementMatcher<? super TypeDescription> 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.
|
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–2015. All rights reserved.