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.
|
boolean |
equals(Object other) |
int |
hashCode() |
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.
|
String |
toString() |
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 to be
abstract . |
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, withParameters
withParameter, withParameter, withParameter, withParameter, withParameter
throwing, throwing, throwing
typeVariable, typeVariable, typeVariable, typeVariable
defaultValue
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
withParameter, withParameter, withParameter, withParameter, withParameter
throwing, throwing, throwing
typeVariable, typeVariable, typeVariable, typeVariable
defaultValue
protected 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)
DynamicType.Builder.MethodDefinition.ParameterDefinition
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)
DynamicType.Builder.MethodDefinition.ParameterDefinition.Simple
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)
DynamicType.Builder.MethodDefinition.ExceptionDefinition
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)
DynamicType.Builder.MethodDefinition.TypeVariableDefinition
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)
DynamicType.Builder.MethodDefinition.ImplementationDefinition
implementation
- The implementation for implementing the previously defined or matched method.public DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition<U> withoutCode()
DynamicType.Builder.MethodDefinition.ImplementationDefinition
abstract
.public DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition<U> defaultValue(AnnotationValue<?,?> annotationValue)
DynamicType.Builder.MethodDefinition.ImplementationDefinition
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–2017. All rights reserved.