Package net.bytebuddy.dynamic
Class DynamicType.Builder.MethodDefinition.TypeVariableDefinition.AbstractBase<V>
java.lang.Object
net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.ImplementationDefinition.AbstractBase<V>
net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.TypeVariableDefinition.AbstractBase<V>
- Type Parameters:
V
- A loaded type that the built type is guaranteed to be a subclass of.
- All Implemented Interfaces:
DynamicType.Builder.MethodDefinition.ImplementationDefinition<V>
,DynamicType.Builder.MethodDefinition.TypeVariableDefinition<V>
- Direct Known Subclasses:
DynamicType.Builder.MethodDefinition.ExceptionDefinition.AbstractBase
,DynamicType.Builder.MethodDefinition.TypeVariableDefinition.Annotatable.AbstractBase
- Enclosing interface:
DynamicType.Builder.MethodDefinition.TypeVariableDefinition<U>
public abstract static class DynamicType.Builder.MethodDefinition.TypeVariableDefinition.AbstractBase<V>
extends DynamicType.Builder.MethodDefinition.ImplementationDefinition.AbstractBase<V>
implements DynamicType.Builder.MethodDefinition.TypeVariableDefinition<V>
An abstract base implementation for defining an implementation of a method and optionally defining a type variable.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.ImplementationDefinition
DynamicType.Builder.MethodDefinition.ImplementationDefinition.AbstractBase<V>, DynamicType.Builder.MethodDefinition.ImplementationDefinition.Optional<V>
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.TypeVariableDefinition
DynamicType.Builder.MethodDefinition.TypeVariableDefinition.AbstractBase<V>, DynamicType.Builder.MethodDefinition.TypeVariableDefinition.Annotatable<V>
-
Constructor Summary
Constructors -
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, 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 class net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.ImplementationDefinition.AbstractBase
defaultValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
-
Constructor Details
-
AbstractBase
public AbstractBase()
-
-
Method Details
-
typeVariable
public DynamicType.Builder.MethodDefinition.TypeVariableDefinition.Annotatable<V> typeVariable(String symbol) Defines a method variable to be declared by the currently defined method. The defined method variable does not define any bounds.- Specified by:
typeVariable
in interfaceDynamicType.Builder.MethodDefinition.TypeVariableDefinition<V>
- 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
public DynamicType.Builder.MethodDefinition.TypeVariableDefinition.Annotatable<V> typeVariable(String symbol, Type... bound) Defines a method variable to be declared by the currently defined method.- Specified by:
typeVariable
in interfaceDynamicType.Builder.MethodDefinition.TypeVariableDefinition<V>
- Parameters:
symbol
- The symbol of the type variable.bound
- The bounds of the type variables. Can also beTargetType
for 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
public DynamicType.Builder.MethodDefinition.TypeVariableDefinition.Annotatable<V> typeVariable(String symbol, List<? extends Type> bounds) Defines a method variable to be declared by the currently defined method.- Specified by:
typeVariable
in interfaceDynamicType.Builder.MethodDefinition.TypeVariableDefinition<V>
- Parameters:
symbol
- The symbol of the type variable.bounds
- The bounds of the type variables. Can also beTargetType
for 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
public DynamicType.Builder.MethodDefinition.TypeVariableDefinition.Annotatable<V> typeVariable(String symbol, TypeDefinition... bound) Defines a method variable to be declared by the currently defined method.- Specified by:
typeVariable
in interfaceDynamicType.Builder.MethodDefinition.TypeVariableDefinition<V>
- Parameters:
symbol
- The symbol of the type variable.bound
- The bounds of the type variables. Can also beTargetType
for 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.
-