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 Classes Modifier and Type Interface Description static class
DynamicType.Builder.MethodDefinition.ParameterDefinition.AbstractBase<V>
An abstract base implementation for defining an implementation of a method and optionally defining a type variable, thrown exception or parameter type.static interface
DynamicType.Builder.MethodDefinition.ParameterDefinition.Annotatable<V>
A builder for optionally defining an annotation on a parameter.static interface
DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial<V>
A builder for defining an implementation of a method and optionally defining a type variable, thrown exception or method parameter.static interface
DynamicType.Builder.MethodDefinition.ParameterDefinition.Simple<V>
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DynamicType.Builder.MethodDefinition.ParameterDefinition.Annotatable<U>
withParameter(java.lang.reflect.Type type, java.lang.String name, int modifiers)
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(java.lang.reflect.Type type, java.lang.String name, java.util.Collection<? extends ModifierContributor.ForParameter> modifierContributors)
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(java.lang.reflect.Type type, java.lang.String name, ModifierContributor.ForParameter... modifierContributor)
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, java.lang.String name, int modifiers)
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, java.lang.String name, java.util.Collection<? extends ModifierContributor.ForParameter> modifierContributors)
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, java.lang.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 Detail
-
withParameter
DynamicType.Builder.MethodDefinition.ParameterDefinition.Annotatable<U> withParameter(java.lang.reflect.Type type, java.lang.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(java.lang.reflect.Type type, java.lang.String name, java.util.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(java.lang.reflect.Type type, java.lang.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, java.lang.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, java.lang.String name, java.util.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, java.lang.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.
-
-