public static class ByteBuddy.MethodAnnotationTarget extends ByteBuddy.Proxy
ByteBuddy configuration with a selected set of methods for which annotations can
be defined.ByteBuddy.Definable<T>, ByteBuddy.MatchedMethodInterception, ByteBuddy.MethodAnnotationTarget, ByteBuddy.MethodInterceptable, ByteBuddy.OptionalMethodInterception, ByteBuddy.Proxy| Modifier and Type | Field and Description |
|---|---|
protected MethodAttributeAppender.Factory |
attributeAppenderFactory
The method attribute appender factory that was defined for the current method selection.
|
protected Instrumentation |
instrumentation
The instrumentation that was defined for the current method selection.
|
protected ElementMatcher<? super MethodDescription> |
methodMatcher
The method matcher representing the current method selection.
|
bridgeMethodResolverFactory, BYTE_BUDDY_DEFAULT_PREFIX, classFileVersion, classVisitorWrapperChain, defaultFieldAttributeAppenderFactory, defaultMethodAttributeAppenderFactory, ignoredMethods, interfaceTypes, methodLookupEngineFactory, methodRegistry, modifiers, namingStrategy, typeAttributeAppender| Modifier | Constructor and Description |
|---|---|
protected |
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.
|
| Modifier and Type | Method and Description |
|---|---|
ByteBuddy.MethodAnnotationTarget |
annotateMethod(Annotation... annotation)
Defines an method annotation for the currently selected methods.
|
ByteBuddy.MethodAnnotationTarget |
annotateParameter(int parameterIndex,
Annotation... annotation)
Defines an method annotation for a parameter of the currently selected methods.
|
ByteBuddy.MethodAnnotationTarget |
attribute(MethodAttributeAppender.Factory attributeAppenderFactory)
Defines a given attribute appender factory to be applied for the currently selected methods.
|
boolean |
equals(Object other) |
int |
hashCode() |
protected ByteBuddy |
materialize()
Materializes the current extended configuration.
|
String |
toString() |
constructor, getBridgeMethodResolverFactory, getClassFileVersion, getClassVisitorWrapperChain, getDefaultFieldAttributeAppenderFactory, getDefaultMethodAttributeAppenderFactory, getIgnoredMethods, getInterfaceTypes, getMethodLookupEngineFactory, getMethodRegistry, getModifiers, getNamingStrategy, getTypeAttributeAppender, invokable, method, rebase, rebase, rebase, rebase, rebase, redefine, redefine, redefine, subclass, subclass, subclass, subclass, withAttribute, withBridgeMethodResolver, withClassFileVersion, withClassVisitor, withDefaultFieldAttributeAppender, withDefaultMethodAttributeAppender, withIgnoredMethods, withImplementing, withImplementing, withMethodLookupEngine, withModifiers, withNamingStrategy, withNamingStrategy, withTypeAnnotationprotected final ElementMatcher<? super MethodDescription> methodMatcher
protected final Instrumentation instrumentation
protected final MethodAttributeAppender.Factory attributeAppenderFactory
protected 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)
classFileVersion - The currently defined class file version.namingStrategy - The currently defined naming strategy.interfaceTypes - The currently defined collection of interfaces to be implemented
by any dynamically created type.ignoredMethods - The methods to always be ignored.bridgeMethodResolverFactory - The bridge method resolver factory to be applied to any instrumentation
process.classVisitorWrapperChain - The class visitor wrapper chain to be applied to any instrumentation
process.methodRegistry - The currently valid method registry.modifiers - The modifiers to define for any instrumentation process.typeAttributeAppender - The type attribute appender to apply to any instrumentation process.methodLookupEngineFactory - The method lookup engine factory to apply to this configuration.defaultFieldAttributeAppenderFactory - The field attribute appender to apply as a default for any field
definition.defaultMethodAttributeAppenderFactory - The method attribute appender to apply as a default for any
method definition or instrumentation.methodMatcher - The method matcher representing the current method selection.instrumentation - The instrumentation that was defined for the current method
selection.attributeAppenderFactory - The method attribute appender factory that was defined for the
current method selection.public ByteBuddy.MethodAnnotationTarget attribute(MethodAttributeAppender.Factory attributeAppenderFactory)
attributeAppenderFactory - The method attribute appender factory to apply to the currently
selected methods.public ByteBuddy.MethodAnnotationTarget annotateMethod(Annotation... annotation)
annotation - The annotations to defined for the currently selected methods.public ByteBuddy.MethodAnnotationTarget annotateParameter(int parameterIndex, Annotation... annotation)
parameterIndex - The index of the parameter for which the annotations should be applied
with the first parameter index by 0.annotation - The annotations to defined for the currently selected methods' parameters
ath the given index.protected ByteBuddy materialize()
ByteBuddy.Proxymaterialize in class ByteBuddy.ProxyCopyright © 2014. All rights reserved.