Package net.bytebuddy.dynamic
Interface DynamicType.Builder.MethodDefinition.ParameterDefinition<U>
- Type Parameters:
U
- A loaded type that the built type is guaranteed to be a subclass of.
- All Superinterfaces:
DynamicType.Builder.MethodDefinition.ExceptionDefinition<U>
,DynamicType.Builder.MethodDefinition.ImplementationDefinition<U>
,DynamicType.Builder.MethodDefinition.TypeVariableDefinition<U>
- All Known Subinterfaces:
DynamicType.Builder.MethodDefinition.ParameterDefinition.Annotatable<V>
,DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial<V>
- All Known Implementing Classes:
DynamicType.Builder.AbstractBase.Adapter.MethodDefinitionAdapter
,DynamicType.Builder.AbstractBase.Adapter.MethodDefinitionAdapter.ParameterAnnotationAdapter
,DynamicType.Builder.MethodDefinition.ParameterDefinition.AbstractBase
,DynamicType.Builder.MethodDefinition.ParameterDefinition.Annotatable.AbstractBase
,DynamicType.Builder.MethodDefinition.ParameterDefinition.Annotatable.AbstractBase.Adapter
,DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial.AbstractBase
- Enclosing interface:
- DynamicType.Builder.MethodDefinition<S>
public static interface DynamicType.Builder.MethodDefinition.ParameterDefinition<U>
extends DynamicType.Builder.MethodDefinition.ExceptionDefinition<U>
A builder for defining an implementation of a method and optionally defining a type variable, thrown exception or method parameter.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
An abstract base implementation for defining an implementation of a method and optionally defining a type variable, thrown exception or parameter type.static interface
A builder for optionally defining an annotation on a parameter.static interface
A builder for defining an implementation of a method and optionally defining a type variable, thrown exception or method parameter.static interface
A builder for defining an implementation of a method and optionally defining a type variable, thrown exception or a parameter type.Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.ImplementationDefinition
DynamicType.Builder.MethodDefinition.ImplementationDefinition.Optional<V>
-
Method Summary
Modifier and TypeMethodDescriptionwithParameter
(Type type, String name, int modifiers) Defines the specified parameter for the currently defined method as the last parameter of the currently defined method.withParameter
(Type type, String name, Collection<? extends ModifierContributor.ForParameter> modifierContributors) Defines the specified parameter for the currently defined method as the last parameter of the currently defined method.withParameter
(Type type, String name, ModifierContributor.ForParameter... modifierContributor) Defines the specified parameter for the currently defined method as the last parameter of the currently defined method.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
(TypeDefinition type, String name, Collection<? extends ModifierContributor.ForParameter> modifierContributors) Defines the specified parameter for the currently defined method as the last parameter of the currently defined method.withParameter
(TypeDefinition type, String name, ModifierContributor.ForParameter... modifierContributor) Defines the specified parameter for the currently defined method as the last parameter of the currently defined method.Methods inherited from interface net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.ExceptionDefinition
throwing, throwing, throwing, throwing
Methods inherited from interface net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.ImplementationDefinition
defaultValue, defaultValue, intercept, withoutCode
Methods inherited from interface net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.TypeVariableDefinition
typeVariable, typeVariable, typeVariable, typeVariable, typeVariable
-
Method Details
-
withParameter
DynamicType.Builder.MethodDefinition.ParameterDefinition.Annotatable<U> withParameter(Type type, String name, ModifierContributor.ForParameter... modifierContributor) Defines the specified parameter for the currently defined method as the last parameter of the currently defined method.- Parameters:
type
- The parameter's type. Can also beTargetType
if the parameter type should be equal to the currently instrumented type.name
- The parameter's name.modifierContributor
- The parameter's modifiers.- Returns:
- A new builder that is equal to the current builder but where the currently defined method appends the specified parameter.
-
withParameter
DynamicType.Builder.MethodDefinition.ParameterDefinition.Annotatable<U> withParameter(Type type, String name, Collection<? extends ModifierContributor.ForParameter> modifierContributors) Defines the specified parameter for the currently defined method as the last parameter of the currently defined method.- Parameters:
type
- The parameter's type. Can also beTargetType
if the parameter type should be equal to the currently instrumented type.name
- The parameter's name.modifierContributors
- The parameter's modifiers.- Returns:
- A new builder that is equal to the current builder but where the currently defined method appends the specified parameter.
-
withParameter
DynamicType.Builder.MethodDefinition.ParameterDefinition.Annotatable<U> withParameter(Type type, String name, int modifiers) Defines the specified parameter for the currently defined method as the last parameter of the currently defined method.- Parameters:
type
- The parameter's type. Can also beTargetType
if the parameter type should be equal to the currently instrumented type.name
- The parameter's name.modifiers
- The parameter's modifiers.- Returns:
- A new builder that is equal to the current builder but where the currently defined method appends the specified parameter.
-
withParameter
DynamicType.Builder.MethodDefinition.ParameterDefinition.Annotatable<U> withParameter(TypeDefinition type, String name, ModifierContributor.ForParameter... modifierContributor) Defines the specified parameter for the currently defined method as the last parameter of the currently defined method.- Parameters:
type
- The parameter's type. Can also beTargetType
if the parameter type should be equal to the currently instrumented type.name
- The parameter's name.modifierContributor
- The parameter's modifiers.- Returns:
- A new builder that is equal to the current builder but where the currently defined method appends the specified parameter.
-
withParameter
DynamicType.Builder.MethodDefinition.ParameterDefinition.Annotatable<U> withParameter(TypeDefinition type, String name, Collection<? extends ModifierContributor.ForParameter> modifierContributors) Defines the specified parameter for the currently defined method as the last parameter of the currently defined method.- Parameters:
type
- The parameter's type. Can also beTargetType
if the parameter type should be equal to the currently instrumented type.name
- The parameter's name.modifierContributors
- The parameter's modifiers.- Returns:
- A new builder that is equal to the current builder but where the currently defined method appends the specified parameter.
-
withParameter
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.- Parameters:
type
- The parameter's type. Can also beTargetType
if the parameter type should be equal to the currently instrumented type.name
- The parameter's name.modifiers
- The parameter's modifiers.- Returns:
- A new builder that is equal to the current builder but where the currently defined method appends the specified parameter.
-