@HashCodeAndEqualsPlugin.Enhance(includeSyntheticFields=true) protected class DynamicType.Builder.AbstractBase.Adapter.MethodDefinitionAdapter extends DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial.AbstractBase<U>
| Modifier and Type | Class and Description |
|---|---|
protected class |
DynamicType.Builder.AbstractBase.Adapter.MethodDefinitionAdapter.AnnotationAdapter
An annotation adapter for a method definition.
|
protected class |
DynamicType.Builder.AbstractBase.Adapter.MethodDefinitionAdapter.ParameterAnnotationAdapter
An annotation adapter for a parameter definition.
|
protected class |
DynamicType.Builder.AbstractBase.Adapter.MethodDefinitionAdapter.SimpleParameterAnnotationAdapter
An annotation adapter for a simple parameter definition.
|
protected class |
DynamicType.Builder.AbstractBase.Adapter.MethodDefinitionAdapter.TypeVariableAnnotationAdapter
An adapter for defining a new type variable for the currently defined method.
|
DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial.AbstractBase<W>DynamicType.Builder.MethodDefinition.ParameterDefinition.Annotatable<V>, DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial<V>, DynamicType.Builder.MethodDefinition.ParameterDefinition.Simple<V>DynamicType.Builder.MethodDefinition.ParameterDefinition.Simple.Annotatable<V>DynamicType.Builder.MethodDefinition.ImplementationDefinition.Optional<V>| Modifier | Constructor and Description |
|---|---|
protected |
MethodDefinitionAdapter(MethodDescription.Token token)
Creates a new method definition adapter.
|
| Modifier and Type | Method and Description |
|---|---|
DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition<U> |
defaultValue(AnnotationValue<?,?> annotationValue)
Defines the previously defined or matched method to return the supplied value as an annotation default value.
|
DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition<U> |
intercept(Implementation implementation)
Implements the previously defined or matched method by the supplied implementation.
|
DynamicType.Builder.MethodDefinition.ExceptionDefinition<U> |
throwing(Collection<? extends TypeDefinition> types)
Defines a method variable to be declared by the currently defined method.
|
DynamicType.Builder.MethodDefinition.TypeVariableDefinition.Annotatable<U> |
typeVariable(String symbol,
Collection<? extends TypeDefinition> bounds)
Defines a method variable to be declared by the currently defined method.
|
DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition<U> |
withoutCode()
Defines the previously defined or matched method not to declare a method body.
|
DynamicType.Builder.MethodDefinition.ParameterDefinition.Simple.Annotatable<U> |
withParameter(TypeDefinition type)
Defines the specified parameter for the currently defined method as the last parameter of the currently defined method.
|
DynamicType.Builder.MethodDefinition.ParameterDefinition.Annotatable<U> |
withParameter(TypeDefinition type,
String name,
int modifiers)
Defines the specified parameter for the currently defined method as the last parameter of the currently defined method.
|
withParameter, withParameters, withParameters, withParameters, withParameterswithParameter, withParameter, withParameter, withParameter, withParameterthrowing, throwing, throwingtypeVariable, typeVariable, typeVariable, typeVariabledefaultValueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwithParameter, withParameter, withParameter, withParameter, withParameterthrowing, throwing, throwingtypeVariable, typeVariable, typeVariable, typeVariabledefaultValueprotected MethodDefinitionAdapter(MethodDescription.Token token)
token - A token representing the currently defined method.public DynamicType.Builder.MethodDefinition.ParameterDefinition.Annotatable<U> withParameter(TypeDefinition type, String name, int modifiers)
type - The parameter's type. Can also be TargetType if the parameter type
should be equal to the currently instrumented type.name - The parameter's name.modifiers - The parameter's modifiers.public DynamicType.Builder.MethodDefinition.ParameterDefinition.Simple.Annotatable<U> withParameter(TypeDefinition type)
type - The parameter's type. Can also be TargetType if the parameter type
should be equal to the currently instrumented type.public DynamicType.Builder.MethodDefinition.ExceptionDefinition<U> throwing(Collection<? extends TypeDefinition> types)
types - The type of the exception being declared by the currently defined method.public DynamicType.Builder.MethodDefinition.TypeVariableDefinition.Annotatable<U> typeVariable(String symbol, Collection<? extends TypeDefinition> bounds)
symbol - The symbol of the type variable.bounds - The bounds of the type variables. Can also be TargetType for any type
if a bound type should be equal to the currently instrumented type.public DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition<U> intercept(Implementation implementation)
implementation - The implementation for implementing the previously defined or matched method.public DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition<U> withoutCode()
abstract unless it was already declared to be native.public DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition<U> defaultValue(AnnotationValue<?,?> annotationValue)
EnumerationDescription,
types as TypeDescription and annotations as AnnotationDescription. For supplying loaded types, use
DynamicType.Builder.MethodDefinition.ImplementationDefinition.defaultValue(Object, Class) must be used.annotationValue - The value to be defined as a default value.Copyright © 2014–2023. All rights reserved.