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 Classes Modifier and Type Interface Description static classDynamicType.Builder.MethodDefinition.TypeVariableDefinition.AbstractBase<V>An abstract base implementation for defining an implementation of a method and optionally defining a type variable.static interfaceDynamicType.Builder.MethodDefinition.TypeVariableDefinition.Annotatable<V>A 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DynamicType.Builder.MethodDefinition.TypeVariableDefinition.Annotatable<U>typeVariable(java.lang.String symbol)Defines a method variable to be declared by the currently defined method.DynamicType.Builder.MethodDefinition.TypeVariableDefinition.Annotatable<U>typeVariable(java.lang.String symbol, java.lang.reflect.Type... bound)Defines a method variable to be declared by the currently defined method.DynamicType.Builder.MethodDefinition.TypeVariableDefinition.Annotatable<U>typeVariable(java.lang.String symbol, java.util.Collection<? extends TypeDefinition> bounds)Defines a method variable to be declared by the currently defined method.DynamicType.Builder.MethodDefinition.TypeVariableDefinition.Annotatable<U>typeVariable(java.lang.String symbol, java.util.List<? extends java.lang.reflect.Type> bounds)Defines a method variable to be declared by the currently defined method.DynamicType.Builder.MethodDefinition.TypeVariableDefinition.Annotatable<U>typeVariable(java.lang.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 Detail
-
typeVariable
DynamicType.Builder.MethodDefinition.TypeVariableDefinition.Annotatable<U> typeVariable(java.lang.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(java.lang.String symbol, java.lang.reflect.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(java.lang.String symbol, java.util.List<? extends java.lang.reflect.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(java.lang.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(java.lang.String symbol, java.util.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.
-
-