Package net.bytebuddy.dynamic
Interface DynamicType.Builder.MethodDefinition.TypeVariableDefinition<U>
- Type Parameters:
U- A loaded type that the built type is guaranteed to be a subclass of.
- All Superinterfaces:
DynamicType.Builder.MethodDefinition.ImplementationDefinition<U>
- All Known Subinterfaces:
DynamicType.Builder.MethodDefinition.ExceptionDefinition<U>,DynamicType.Builder.MethodDefinition.ParameterDefinition<U>,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.TypeVariableDefinition.Annotatable<V>
- All Known Implementing Classes:
DynamicType.Builder.AbstractBase.Adapter.MethodDefinitionAdapter,DynamicType.Builder.AbstractBase.Adapter.MethodDefinitionAdapter.ParameterAnnotationAdapter,DynamicType.Builder.AbstractBase.Adapter.MethodDefinitionAdapter.SimpleParameterAnnotationAdapter,DynamicType.Builder.AbstractBase.Adapter.MethodDefinitionAdapter.TypeVariableAnnotationAdapter,DynamicType.Builder.MethodDefinition.ExceptionDefinition.AbstractBase,DynamicType.Builder.MethodDefinition.ParameterDefinition.AbstractBase,DynamicType.Builder.MethodDefinition.ParameterDefinition.Annotatable.AbstractBase,DynamicType.Builder.MethodDefinition.ParameterDefinition.Annotatable.AbstractBase.Adapter,DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial.AbstractBase,DynamicType.Builder.MethodDefinition.ParameterDefinition.Simple.AbstractBase,DynamicType.Builder.MethodDefinition.ParameterDefinition.Simple.Annotatable.AbstractBase,DynamicType.Builder.MethodDefinition.ParameterDefinition.Simple.Annotatable.AbstractBase.Adapter,DynamicType.Builder.MethodDefinition.TypeVariableDefinition.AbstractBase,DynamicType.Builder.MethodDefinition.TypeVariableDefinition.Annotatable.AbstractBase,DynamicType.Builder.MethodDefinition.TypeVariableDefinition.Annotatable.AbstractBase.Adapter
- Enclosing interface:
DynamicType.Builder.MethodDefinition<S>
public static interface DynamicType.Builder.MethodDefinition.TypeVariableDefinition<U>
extends DynamicType.Builder.MethodDefinition.ImplementationDefinition<U>
A builder for defining an implementation of a method and optionally defining a type variable.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classAn abstract base implementation for defining an implementation of a method and optionally defining a type variable.static interfaceA builder for optionally defining an annotation for a type variable.Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.ImplementationDefinition
DynamicType.Builder.MethodDefinition.ImplementationDefinition.Optional<V> -
Method Summary
Modifier and TypeMethodDescriptiontypeVariable(String symbol) Defines a method variable to be declared by the currently defined method.typeVariable(String symbol, Type... bound) Defines a method variable to be declared by the currently defined method.typeVariable(String symbol, Collection<? extends TypeDefinition> bounds) Defines a method variable to be declared by the currently defined method.typeVariable(String symbol, List<? extends Type> bounds) Defines a method variable to be declared by the currently defined method.typeVariable(String symbol, TypeDefinition... bound) Defines a method variable to be declared by the currently defined method.Methods inherited from interface net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.ImplementationDefinition
defaultValue, defaultValue, intercept, withoutCode
-
Method Details
-
typeVariable
DynamicType.Builder.MethodDefinition.TypeVariableDefinition.Annotatable<U> typeVariable(String symbol) Defines a method variable to be declared by the currently defined method. The defined method variable does not define any bounds.- Parameters:
symbol- The symbol of the type variable.- Returns:
- A new builder that is equal to the current builder but where the currently defined method declares the specified type variable.
-
typeVariable
DynamicType.Builder.MethodDefinition.TypeVariableDefinition.Annotatable<U> typeVariable(String symbol, Type... bound) Defines a method variable to be declared by the currently defined method.- Parameters:
symbol- The symbol of the type variable.bound- The bounds of the type variables. Can also beTargetTypefor any type if a bound 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 declares the specified type variable.
-
typeVariable
DynamicType.Builder.MethodDefinition.TypeVariableDefinition.Annotatable<U> typeVariable(String symbol, List<? extends Type> bounds) Defines a method variable to be declared by the currently defined method.- Parameters:
symbol- The symbol of the type variable.bounds- The bounds of the type variables. Can also beTargetTypefor any type if a bound 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 declares the specified type variable.
-
typeVariable
DynamicType.Builder.MethodDefinition.TypeVariableDefinition.Annotatable<U> typeVariable(String symbol, TypeDefinition... bound) Defines a method variable to be declared by the currently defined method.- Parameters:
symbol- The symbol of the type variable.bound- The bounds of the type variables. Can also beTargetTypefor any type if a bound 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 declares the specified type variable.
-
typeVariable
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.- Parameters:
symbol- The symbol of the type variable.bounds- The bounds of the type variables. Can also beTargetTypefor any type if a bound 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 declares the specified type variable.
-