Package net.bytebuddy.dynamic
Interface DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial<V>
-
- Type Parameters:
V
- A loaded type that the built type is guaranteed to be a subclass of.
- All Superinterfaces:
DynamicType.Builder.MethodDefinition.ExceptionDefinition<V>
,DynamicType.Builder.MethodDefinition.ImplementationDefinition<V>
,DynamicType.Builder.MethodDefinition.ParameterDefinition<V>
,DynamicType.Builder.MethodDefinition.ParameterDefinition.Simple<V>
,DynamicType.Builder.MethodDefinition.TypeVariableDefinition<V>
- All Known Implementing Classes:
DynamicType.Builder.AbstractBase.Adapter.MethodDefinitionAdapter
,DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial.AbstractBase
- Enclosing interface:
- DynamicType.Builder.MethodDefinition.ParameterDefinition<U>
public static interface DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial<V> extends DynamicType.Builder.MethodDefinition.ParameterDefinition<V>, DynamicType.Builder.MethodDefinition.ParameterDefinition.Simple<V>
A builder for defining an implementation of a method and optionally defining a type variable, thrown exception or method parameter. Implementations allow for the one-by-one definition of parameters what gives opportunity to annotate parameters in a fluent style. Doing so, it is optionally possible to define parameter names and modifiers. This can be done for either all or no parameters. Alternatively, parameters without annotations, names or modifiers can be defined by a single step.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial.AbstractBase<W>
An abstract base implementation for an initial parameter definition.-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.ImplementationDefinition
DynamicType.Builder.MethodDefinition.ImplementationDefinition.Optional<V>
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.ParameterDefinition
DynamicType.Builder.MethodDefinition.ParameterDefinition.Annotatable<V>, DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial<V>, DynamicType.Builder.MethodDefinition.ParameterDefinition.Simple<V>
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.ParameterDefinition.Simple
DynamicType.Builder.MethodDefinition.ParameterDefinition.Simple.Annotatable<V>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DynamicType.Builder.MethodDefinition.ExceptionDefinition<V>
withParameters(java.lang.reflect.Type... type)
Defines the specified parameters for the currently defined method.DynamicType.Builder.MethodDefinition.ExceptionDefinition<V>
withParameters(java.util.Collection<? extends TypeDefinition> types)
Defines the specified parameters for the currently defined method.DynamicType.Builder.MethodDefinition.ExceptionDefinition<V>
withParameters(java.util.List<? extends java.lang.reflect.Type> types)
Defines the specified parameters for the currently defined method.DynamicType.Builder.MethodDefinition.ExceptionDefinition<V>
withParameters(TypeDefinition... type)
Defines the specified parameters for 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.ParameterDefinition
withParameter, withParameter, withParameter, withParameter, withParameter, withParameter
-
Methods inherited from interface net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.ParameterDefinition.Simple
withParameter, withParameter
-
Methods inherited from interface net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.TypeVariableDefinition
typeVariable, typeVariable, typeVariable, typeVariable, typeVariable
-
-
-
-
Method Detail
-
withParameters
DynamicType.Builder.MethodDefinition.ExceptionDefinition<V> withParameters(java.lang.reflect.Type... type)
Defines the specified parameters for the currently defined method.- Parameters:
type
- The parameter types. Any type can also beTargetType
if the parameter type should be equal to the currently instrumented type.- Returns:
- A new builder that is equal to the current builder but where the currently defined method appends the specified parameters.
-
withParameters
DynamicType.Builder.MethodDefinition.ExceptionDefinition<V> withParameters(java.util.List<? extends java.lang.reflect.Type> types)
Defines the specified parameters for the currently defined method.- Parameters:
types
- The parameter types. Any type can also beTargetType
if the parameter type should be equal to the currently instrumented type.- Returns:
- A new builder that is equal to the current builder but where the currently defined method appends the specified parameters.
-
withParameters
DynamicType.Builder.MethodDefinition.ExceptionDefinition<V> withParameters(TypeDefinition... type)
Defines the specified parameters for the currently defined method.- Parameters:
type
- The parameter types. Any type can also beTargetType
if the parameter type should be equal to the currently instrumented type.- Returns:
- A new builder that is equal to the current builder but where the currently defined method appends the specified parameters.
-
withParameters
DynamicType.Builder.MethodDefinition.ExceptionDefinition<V> withParameters(java.util.Collection<? extends TypeDefinition> types)
Defines the specified parameters for the currently defined method.- Parameters:
types
- The parameter types. Any type can also beTargetType
if the parameter type should be equal to the currently instrumented type.- Returns:
- A new builder that is equal to the current builder but where the currently defined method appends the specified parameters.
-
-