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 MethodRegistry.Handler |
handler
The handler for the entry that is to be registered.
|
protected LatentMethodMatcher |
methodMatcher
The method matcher representing the current method selection.
|
auxiliaryTypeNamingStrategy, bridgeMethodResolverFactory, BYTE_BUDDY_DEFAULT_PREFIX, BYTE_BUDDY_DEFAULT_SUFFIX, classFileVersion, classVisitorWrapperChain, defaultFieldAttributeAppenderFactory, defaultMethodAttributeAppenderFactory, ignoredMethods, interfaceTypes, methodLookupEngineFactory, methodRegistry, modifiers, namingStrategy, typeAttributeAppender
Modifier | Constructor and Description |
---|---|
protected |
MethodAnnotationTarget(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
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,
LatentMethodMatcher methodMatcher,
MethodRegistry.Handler handler,
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 |
annotateMethod(AnnotationDescription... 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 |
annotateParameter(int parameterIndex,
AnnotationDescription... 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, invokeable, makeAnnotation, makeInterface, makeInterface, makeInterface, 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, withNamingStrategy, withTypeAnnotation, withTypeAnnotation
getAuxiliaryTypeNamingStrategy
protected final LatentMethodMatcher methodMatcher
protected final MethodRegistry.Handler handler
protected final MethodAttributeAppender.Factory attributeAppenderFactory
protected MethodAnnotationTarget(ClassFileVersion classFileVersion, NamingStrategy.Unbound namingStrategy, AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy, 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, LatentMethodMatcher methodMatcher, MethodRegistry.Handler handler, MethodAttributeAppender.Factory attributeAppenderFactory)
classFileVersion
- The currently defined class file version.namingStrategy
- The currently defined naming strategy.auxiliaryTypeNamingStrategy
- The currently defined naming strategy for auxiliary types.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 implementation
process.classVisitorWrapperChain
- The class visitor wrapper chain to be applied to any implementation
process.methodRegistry
- The currently valid method registry.modifiers
- The modifiers to define for any implementation process.typeAttributeAppender
- The type attribute appender to apply to any implementation 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 implementation.methodMatcher
- The method matcher representing the current method selection.handler
- The handler for the entry that is to be registered.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.public ByteBuddy.MethodAnnotationTarget annotateMethod(AnnotationDescription... annotation)
annotation
- The annotations to defined for the currently selected methods.public ByteBuddy.MethodAnnotationTarget annotateParameter(int parameterIndex, AnnotationDescription... 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.Proxy
materialize
in class ByteBuddy.Proxy
Copyright © 2014–2015. All rights reserved.