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.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.generic |
Contains descriptions for generic types as defined in the Java programming language.
|
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 | Field and Description |
---|---|
protected ElementMatcher<? super MethodDescription> |
ByteBuddy.ignoredMethods
A matcher for identifying methods that should never be intercepted.
|
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 level methods, i.e.
|
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,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
MethodRegistry methodRegistry,
ByteBuddy.Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory)
Defines a new
ByteBuddy configuration. |
MethodAnnotationTarget(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
MethodRegistry methodRegistry,
ByteBuddy.Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
LatentMethodMatcher methodMatcher,
MethodRegistry.Handler handler,
MethodAttributeAppender.Factory attributeAppenderFactory,
MethodTransformer methodTransformer)
Creates a new method annotation target.
|
OptionalMethodInterception(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
MethodRegistry methodRegistry,
ByteBuddy.Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
LatentMethodMatcher methodMatcher)
Creates a new optional method interception.
|
Proxy(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
MethodRegistry methodRegistry,
ByteBuddy.Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory)
Defines a new proxy configuration for
ByteBuddy . |
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 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 | Method and Description |
---|---|
S |
ByteCodeElement.TypeDependant.asToken(ElementMatcher<? super GenericTypeDescription> targetTypeMatcher)
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 GenericTypeDescription> targetTypeMatcher) |
ByteCodeElement.Token.TokenList<FieldDescription.Token> |
FieldList.asTokenList(ElementMatcher<? super GenericTypeDescription> targetTypeMatcher)
Transforms the list of field descriptions into a list of detached tokens.
|
ByteCodeElement.Token.TokenList<FieldDescription.Token> |
FieldList.AbstractBase.asTokenList(ElementMatcher<? super GenericTypeDescription> targetTypeMatcher) |
ByteCodeElement.Token.TokenList<FieldDescription.Token> |
FieldList.Empty.asTokenList(ElementMatcher<? super GenericTypeDescription> targetTypeMatcher) |
Constructor and Description |
---|
ForDetachment(ElementMatcher<? super TypeDescription> typeMatcher)
Creates a visitor for detaching a type.
|
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 |
---|---|
DynamicType.Builder.MatchedMethodInterception<T> |
DynamicType.Builder.constructor(ElementMatcher<? super MethodDescription> methodMatcher)
Selects a set of constructors of this type for implementation.
|
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 level methods, i.e.
|
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,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
InstrumentedType.TypeInitializer typeInitializer,
TypeDescription targetType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<FieldDescription.Token> fieldTokens,
List<MethodDescription.Token> 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,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
InstrumentedType.TypeInitializer typeInitializer,
TypeDescription targetType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<FieldDescription.Token> fieldTokens,
List<MethodDescription.Token> methodTokens)
Creates a new immutable type builder base implementation.
|
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 | Method and Description |
---|---|
ElementMatcher<? super MethodDescription> |
MethodRegistry.Default.Entry.resolve(TypeDescription instrumentedType) |
Modifier and Type | Method and Description |
---|---|
protected MethodGraph.Compiler.Default.Key.Store<T> |
MethodGraph.Compiler.Default.analyze(GenericTypeDescription typeDescription,
Map<GenericTypeDescription,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(GenericTypeDescription typeDescription,
Map<GenericTypeDescription,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(GenericTypeDescription typeDescription,
Map<GenericTypeDescription,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.
|
Modifier and Type | Method and Description |
---|---|
ElementMatcher<? super MethodDescription> |
InliningImplementationMatcher.resolve(TypeDescription instrumentedType) |
Modifier and Type | Method and Description |
---|---|
protected DynamicType.Builder<T> |
RedefinitionDynamicTypeBuilder.materialize(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
InstrumentedType.TypeInitializer typeInitializer,
TypeDescription levelType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<FieldDescription.Token> fieldTokens,
List<MethodDescription.Token> methodTokens) |
protected DynamicType.Builder<T> |
RebaseDynamicTypeBuilder.materialize(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
InstrumentedType.TypeInitializer typeInitializer,
TypeDescription levelType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<FieldDescription.Token> fieldTokens,
List<MethodDescription.Token> methodTokens) |
protected static LatentMethodMatcher |
InliningImplementationMatcher.of(ElementMatcher<? super MethodDescription> ignoredMethods,
TypeDescription targetType)
Creates a matcher where only overridable or declared methods are matched unless those are ignored.
|
Constructor and Description |
---|
InliningImplementationMatcher(ElementMatcher<? super MethodDescription> ignoredMethods,
ElementMatcher<? super MethodDescription> predefinedMethodSignatures)
Creates a new inline implementation matcher.
|
InliningImplementationMatcher(ElementMatcher<? super MethodDescription> ignoredMethods,
ElementMatcher<? super MethodDescription> predefinedMethodSignatures)
Creates a new inline implementation matcher.
|
RebaseDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
InstrumentedType.TypeInitializer typeInitializer,
TypeDescription levelType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<FieldDescription.Token> fieldTokens,
List<MethodDescription.Token> methodTokens,
ClassFileLocator classFileLocator,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer)
Creates a new rebase dynamic type builder.
|
RebaseDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
TypeDescription levelType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
ClassFileLocator classFileLocator,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer)
Creates a new rebase dynamic type builder.
|
RedefinitionDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
InstrumentedType.TypeInitializer typeInitializer,
TypeDescription levelType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<FieldDescription.Token> fieldTokens,
List<MethodDescription.Token> methodTokens,
ClassFileLocator classFileLocator)
Creates a new redefinition dynamic type builder.
|
RedefinitionDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
TypeDescription levelType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
ClassFileLocator classFileLocator)
Creates a new redefinition dynamic type builder.
|
Modifier and Type | Method and Description |
---|---|
ElementMatcher<? super MethodDescription> |
SubclassDynamicTypeBuilder.InstrumentableMatcher.resolve(TypeDescription instrumentedType) |
Modifier and Type | Method and Description |
---|---|
protected DynamicType.Builder<T> |
SubclassDynamicTypeBuilder.materialize(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
InstrumentedType.TypeInitializer typeInitializer,
TypeDescription targetType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<FieldDescription.Token> fieldTokens,
List<MethodDescription.Token> methodTokens) |
Constructor and Description |
---|
InstrumentableMatcher(ElementMatcher<? super MethodDescription> ignoredMethods)
Creates a latent method matcher that matches all methods that are to be instrumented by a
SubclassDynamicTypeBuilder . |
SubclassDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
InstrumentedType.TypeInitializer typeInitializer,
TypeDescription superType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<FieldDescription.Token> fieldTokens,
List<MethodDescription.Token> methodTokens,
ConstructorStrategy constructorStrategy)
Creates a new immutable type builder for a subclassing a given class.
|
SubclassDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
TypeDescription superType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
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.
|
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 GenericTypeDescription>>
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 GenericTypeDescription>
An element matcher that checks if a type description declares fields of a given property.
|
class |
DeclaringMethodMatcher<T extends GenericTypeDescription>
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 |
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.
|
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.
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 |
RawTypeMatcher<T extends GenericTypeDescription>
An element matcher that matches its argument's
GenericTypeDescription 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 |
TokenMatcher<T extends ByteCodeElement.TypeDependant<?,S>,S extends ByteCodeElement.Token<S>>
An element matcher that matches a byte code's element's token against a matcher for such a token.
|
class |
TypeSortMatcher<T extends GenericTypeDescription>
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 GenericTypeDescription> |
ElementMatchers.isVariable(ElementMatcher<? super NamedElement> matcher)
Matches a type variable with the given name.
|
static <T extends GenericTypeDescription> |
ElementMatchers.isVariable(String symbol)
Matches a type variable with the given name.
|
ElementMatcher<? super MethodDescription> |
LatentMethodMatcher.resolve(TypeDescription instrumentedType)
Resolves the latent method matcher.
|
ElementMatcher<? super MethodDescription> |
LatentMethodMatcher.Resolved.resolve(TypeDescription instrumentedType) |
ElementMatcher<? super MethodDescription> |
LatentMethodMatcher.ForToken.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 GenericTypeDescription> |
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 GenericTypeDescription>> exceptionMatcher)
Matches a method's generic exception types against the provided matcher.
|
static <T extends GenericTypeDescription> |
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 extends FieldDescription> |
ElementMatchers.fieldRepresentedBy(ElementMatcher<? super FieldDescription.Token> matcher)
Matches a field by a token matcher.
|
static <T extends FieldDescription> |
ElementMatchers.fieldType(ElementMatcher<? super GenericTypeDescription> 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 GenericTypeDescription> 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 GenericTypeDescription> 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 GenericTypeDescription> matcher)
Matches a
ByteCodeElement for being declared by a GenericTypeDescription that is matched by the given matcher. |
static <T extends MethodDescription> |
ElementMatchers.isGetter(ElementMatcher<? super GenericTypeDescription> 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 GenericTypeDescription> matcher)
Matches any Java bean setter method which takes an argument that matches the supplied matcher.
|
static <T extends GenericTypeDescription> |
ElementMatchers.isVariable(ElementMatcher<? super NamedElement> matcher)
Matches a type variable with the given name.
|
static <T extends MethodDescription> |
ElementMatchers.methodRepresentedBy(ElementMatcher<? super MethodDescription.Token> matcher)
Matches a method by a token matcher.
|
static <T> ElementMatcher.Junction<T> |
ElementMatchers.not(ElementMatcher<? super T> matcher)
Inverts another matcher.
|
static <T extends GenericTypeDescription> |
ElementMatchers.ofSort(ElementMatcher<? super GenericTypeDescription.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 ParameterDescription> |
ElementMatchers.parameterRepresentedBy(ElementMatcher<? super ParameterDescription.Token> matcher)
Matches a parameter by a token matcher.
|
static <T extends GenericTypeDescription> |
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 GenericTypeDescription>> |
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 GenericTypeDescription> matcher)
Matches
MethodDescription s that matches a matched method's return type. |
static <T extends MethodDescription> |
ElementMatchers.takesGenericArguments(ElementMatcher<? super Iterable<? extends GenericTypeDescription>> 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 GenericTypeDescription> 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.
|
FieldTypeMatcher(ElementMatcher<? super GenericTypeDescription> 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 GenericTypeList> 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 GenericTypeDescription> matcher)
Creates a new matcher for a method's parameter's type.
|
MethodParameterTypesMatcher(ElementMatcher<? super List<? extends GenericTypeDescription>> matcher)
Creates a new matcher for a method's parameter types.
|
MethodReturnTypeMatcher(ElementMatcher<? super GenericTypeDescription> 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 MethodDescription> methodMatcher)
Creates a new resolved latent method matcher.
|
TokenMatcher(ElementMatcher<? super S> matcher)
Creates a new token matcher.
|
TypeSortMatcher(ElementMatcher<? super GenericTypeDescription.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–2015. All rights reserved.