protected class DynamicType.Builder.AbstractBase.DefaultMethodAnnotationTarget extends DynamicType.Builder.AbstractBase.AbstractDelegatingBuilder<S> implements DynamicType.Builder.MethodAnnotationTarget<S>
DynamicType.Builder.MethodAnnotationTarget
which allows the definition of
annotations for a recently identified method.DynamicType.Builder.AbstractBase<S>, DynamicType.Builder.ExceptionDeclarableMethodInterception<S>, DynamicType.Builder.FieldAnnotationTarget<S>, DynamicType.Builder.FieldValueTarget<S>, DynamicType.Builder.MatchedMethodInterception<S>, DynamicType.Builder.MethodAnnotationTarget<S>, DynamicType.Builder.OptionalMatchedMethodInterception<S>
Modifier | Constructor and Description |
---|---|
protected |
DefaultMethodAnnotationTarget(LatentMethodMatcher methodMatcher,
List<MethodDescription.Token> methodTokens,
MethodRegistry.Handler handler,
MethodAttributeAppender.Factory attributeAppenderFactory,
MethodTransformer methodTransformer)
Creates a new default method annotation target.
|
Modifier and Type | Method and Description |
---|---|
DynamicType.Builder.MethodAnnotationTarget<S> |
annotateMethod(Annotation... annotation)
Defines annotations to be added to the currently selected method.
|
DynamicType.Builder.MethodAnnotationTarget<S> |
annotateMethod(AnnotationDescription... annotation)
Defines annotations to be added to the currently selected method.
|
DynamicType.Builder.MethodAnnotationTarget<S> |
annotateMethod(Collection<? extends AnnotationDescription> annotations)
Defines annotations to be added to the currently selected method.
|
DynamicType.Builder.MethodAnnotationTarget<S> |
annotateMethod(Iterable<? extends Annotation> annotations)
Defines annotations to be added to the currently selected method.
|
DynamicType.Builder.MethodAnnotationTarget<S> |
annotateParameter(int parameterIndex,
Annotation... annotation)
Defines annotations to be added to a parameter of the currently selected methods.
|
DynamicType.Builder.MethodAnnotationTarget<S> |
annotateParameter(int parameterIndex,
AnnotationDescription... annotation)
Defines annotations to be added to a parameter of the currently selected methods.
|
DynamicType.Builder.MethodAnnotationTarget<S> |
annotateParameter(int parameterIndex,
Collection<? extends AnnotationDescription> annotations)
Defines annotations to be added to a parameter of the currently selected methods.
|
DynamicType.Builder.MethodAnnotationTarget<S> |
annotateParameter(int parameterIndex,
Iterable<? extends Annotation> annotations)
Defines annotations to be added to a parameter of the currently selected methods.
|
DynamicType.Builder.MethodAnnotationTarget<S> |
attribute(MethodAttributeAppender.Factory attributeAppenderFactory)
Defines an attribute appender factory to be applied onto the currently selected methods.
|
boolean |
equals(Object other) |
int |
hashCode() |
protected DynamicType.Builder<S> |
materialize()
Materializes the current state of the build before applying another modification.
|
String |
toString() |
annotateType, annotateType, annotateType, annotateType, attribute, classFileVersion, classVisitor, constructor, context, define, defineConstructor, defineConstructor, defineConstructor, defineConstructor, defineConstructor, defineConstructor, defineField, defineField, defineField, defineField, defineField, defineField, defineMethod, defineMethod, defineMethod, defineMethod, defineMethod, defineMethod, ignoreMethods, implement, implement, implement, implement, invokable, invokable, make, method, methodGraphCompiler, modifiers, modifiers, name, name, name
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
annotateType, annotateType, annotateType, annotateType, attribute, classFileVersion, classVisitor, constructor, context, define, defineConstructor, defineConstructor, defineConstructor, defineConstructor, defineConstructor, defineConstructor, defineField, defineField, defineField, defineField, defineField, defineField, defineMethod, defineMethod, defineMethod, defineMethod, defineMethod, defineMethod, ignoreMethods, implement, implement, implement, implement, invokable, invokable, make, method, methodGraphCompiler, modifiers, modifiers, name, name, name
protected DefaultMethodAnnotationTarget(LatentMethodMatcher methodMatcher, List<MethodDescription.Token> methodTokens, MethodRegistry.Handler handler, MethodAttributeAppender.Factory attributeAppenderFactory, MethodTransformer methodTransformer)
methodMatcher
- A matcher for the methods this target intercepts.methodTokens
- A list of all method tokens that were previously defined.handler
- The handler to apply to any matched method.attributeAppenderFactory
- The method attribute appender factory to be applied to the matched methods.methodTransformer
- The method transformer to apply.protected DynamicType.Builder<S> materialize()
DynamicType.Builder.AbstractBase.AbstractDelegatingBuilder
materialize
in class DynamicType.Builder.AbstractBase.AbstractDelegatingBuilder<S>
public DynamicType.Builder.MethodAnnotationTarget<S> attribute(MethodAttributeAppender.Factory attributeAppenderFactory)
DynamicType.Builder.MethodAnnotationTarget
attribute
in interface DynamicType.Builder.MethodAnnotationTarget<S>
attributeAppenderFactory
- The attribute appender factory to apply onto the currently selected
methods.public DynamicType.Builder.MethodAnnotationTarget<S> annotateMethod(Annotation... annotation)
DynamicType.Builder.MethodAnnotationTarget
Note: The annotations will not be visible to
Implementation
s.annotateMethod
in interface DynamicType.Builder.MethodAnnotationTarget<S>
annotation
- The annotations to add to the currently selected methods.public DynamicType.Builder.MethodAnnotationTarget<S> annotateMethod(Iterable<? extends Annotation> annotations)
DynamicType.Builder.MethodAnnotationTarget
Note: The annotations will not be visible to
Implementation
s.annotateMethod
in interface DynamicType.Builder.MethodAnnotationTarget<S>
annotations
- The annotations to add to the currently selected methods.public DynamicType.Builder.MethodAnnotationTarget<S> annotateMethod(AnnotationDescription... annotation)
DynamicType.Builder.MethodAnnotationTarget
Note: The annotations will not be visible to
Implementation
s.annotateMethod
in interface DynamicType.Builder.MethodAnnotationTarget<S>
annotation
- The annotations to add to the currently selected methods.public DynamicType.Builder.MethodAnnotationTarget<S> annotateMethod(Collection<? extends AnnotationDescription> annotations)
DynamicType.Builder.MethodAnnotationTarget
Note: The annotations will not be visible to
Implementation
s.annotateMethod
in interface DynamicType.Builder.MethodAnnotationTarget<S>
annotations
- The annotations to add to the currently selected methods.public DynamicType.Builder.MethodAnnotationTarget<S> annotateParameter(int parameterIndex, Annotation... annotation)
DynamicType.Builder.MethodAnnotationTarget
Note: The annotations will not be visible to
Implementation
s.annotateParameter
in interface DynamicType.Builder.MethodAnnotationTarget<S>
parameterIndex
- The index of the parameter to annotate.annotation
- The annotations to add to a parameter of the currently selected methods.public DynamicType.Builder.MethodAnnotationTarget<S> annotateParameter(int parameterIndex, Iterable<? extends Annotation> annotations)
DynamicType.Builder.MethodAnnotationTarget
Note: The annotations will not be visible to
Implementation
s.annotateParameter
in interface DynamicType.Builder.MethodAnnotationTarget<S>
parameterIndex
- The index of the parameter to annotate.annotations
- The annotations to add to a parameter of the currently selected methods.public DynamicType.Builder.MethodAnnotationTarget<S> annotateParameter(int parameterIndex, AnnotationDescription... annotation)
DynamicType.Builder.MethodAnnotationTarget
Note: The annotations will not be visible to
Implementation
s.annotateParameter
in interface DynamicType.Builder.MethodAnnotationTarget<S>
parameterIndex
- The index of the parameter to annotate.annotation
- The annotations to add to a parameter of the currently selected methods.public DynamicType.Builder.MethodAnnotationTarget<S> annotateParameter(int parameterIndex, Collection<? extends AnnotationDescription> annotations)
DynamicType.Builder.MethodAnnotationTarget
Note: The annotations will not be visible to
Implementation
s.annotateParameter
in interface DynamicType.Builder.MethodAnnotationTarget<S>
parameterIndex
- The index of the parameter to annotate.annotations
- The annotations to add to a parameter of the currently selected methods.Copyright © 2014–2015. All rights reserved.