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.EnumerationImplementation, 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.
|
protected MethodTransformer |
methodTransformer
The method transformer to apply.
|
auxiliaryTypeNamingStrategy, BYTE_BUDDY_DEFAULT_PREFIX, BYTE_BUDDY_DEFAULT_SUFFIX, classFileVersion, classVisitorWrapper, defaultFieldAttributeAppenderFactory, defaultMethodAttributeAppenderFactory, ignoredMethods, implementationContextFactory, interfaceTypes, methodGraphCompiler, methodRegistry, modifiers, namingStrategy, typeAttributeAppender
Modifier | Constructor and Description |
---|---|
protected |
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.
|
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 |
annotateMethod(Collection<? extends AnnotationDescription> annotations)
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 |
annotateParameter(int parameterIndex,
Collection<? extends AnnotationDescription> annotations)
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, invokable, invokable, makeAnnotation, makeEnumeration, makeEnumeration, makeInterface, makeInterface, makeInterface, makeInterface, makeInterface, makeInterface, makePackage, method, rebase, rebase, rebase, rebase, rebase, rebase, rebase, redefine, redefine, redefine, subclass, subclass, subclass, subclass, withAttribute, withClassFileVersion, withClassVisitor, withContext, withDefaultFieldAttributeAppender, withDefaultMethodAttributeAppender, withIgnoredMethods, withImplementing, withImplementing, withImplementing, withImplementing, withMethodGraphCompiler, withModifiers, withNamingStrategy, withNamingStrategy, withNamingStrategy, withTypeAnnotation, withTypeAnnotation, withTypeAnnotation, withTypeAnnotation
protected final LatentMethodMatcher methodMatcher
protected final MethodRegistry.Handler handler
protected final MethodAttributeAppender.Factory attributeAppenderFactory
protected final MethodTransformer methodTransformer
protected 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)
classFileVersion
- The currently defined class file version.namingStrategy
- The currently defined naming strategy.auxiliaryTypeNamingStrategy
- The currently defined naming strategy for auxiliary types.implementationContextFactory
- The currently defined implementation context factory.interfaceTypes
- The currently defined collection of interfaces to be implemented
by any dynamically created type.ignoredMethods
- The methods to always be ignored.
process.classVisitorWrapper
- The class visitor wrapper 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.methodGraphCompiler
- The method graph compiler to use.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.methodTransformer
- The method transformer to apply.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 annotateMethod(AnnotationDescription... annotation)
annotation
- The annotations to defined for the currently selected methods.public ByteBuddy.MethodAnnotationTarget annotateMethod(Collection<? extends AnnotationDescription> annotations)
annotations
- 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 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.public ByteBuddy.MethodAnnotationTarget annotateParameter(int parameterIndex, Collection<? extends AnnotationDescription> annotations)
parameterIndex
- The index of the parameter for which the annotations should be applied
with the first parameter index by 0
.annotations
- 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.