Package net.bytebuddy.dynamic
Interface DynamicType.Builder.MethodDefinition.ExceptionDefinition<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>
,DynamicType.Builder.MethodDefinition.TypeVariableDefinition<U>
- All Known Subinterfaces:
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>
- All Known Implementing Classes:
DynamicType.Builder.AbstractBase.Adapter.MethodDefinitionAdapter
,DynamicType.Builder.AbstractBase.Adapter.MethodDefinitionAdapter.ParameterAnnotationAdapter
,DynamicType.Builder.AbstractBase.Adapter.MethodDefinitionAdapter.SimpleParameterAnnotationAdapter
,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
- Enclosing interface:
- DynamicType.Builder.MethodDefinition<S>
public static interface DynamicType.Builder.MethodDefinition.ExceptionDefinition<U> extends DynamicType.Builder.MethodDefinition.TypeVariableDefinition<U>
A builder for defining an implementation of a method and optionally defining a type variable or thrown exception.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
DynamicType.Builder.MethodDefinition.ExceptionDefinition.AbstractBase<V>
An abstract base implementation for defining an implementation of a method and optionally defining a type variable or thrown exception.-
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.TypeVariableDefinition
DynamicType.Builder.MethodDefinition.TypeVariableDefinition.Annotatable<V>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DynamicType.Builder.MethodDefinition.ExceptionDefinition<U>
throwing(java.lang.reflect.Type... type)
Defines a method variable to be declared by the currently defined method.DynamicType.Builder.MethodDefinition.ExceptionDefinition<U>
throwing(java.util.Collection<? extends TypeDefinition> types)
Defines a method variable to be declared by the currently defined method.DynamicType.Builder.MethodDefinition.ExceptionDefinition<U>
throwing(java.util.List<? extends java.lang.reflect.Type> types)
Defines a method variable to be declared by the currently defined method.DynamicType.Builder.MethodDefinition.ExceptionDefinition<U>
throwing(TypeDefinition... type)
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
-
Methods inherited from interface net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.TypeVariableDefinition
typeVariable, typeVariable, typeVariable, typeVariable, typeVariable
-
-
-
-
Method Detail
-
throwing
DynamicType.Builder.MethodDefinition.ExceptionDefinition<U> throwing(java.lang.reflect.Type... type)
Defines a method variable to be declared by the currently defined method.- Parameters:
type
- The type of the exception being declared by the currently defined method.- Returns:
- A new builder that is equal to the current builder but where the currently defined method declares the specified exception type.
-
throwing
DynamicType.Builder.MethodDefinition.ExceptionDefinition<U> throwing(java.util.List<? extends java.lang.reflect.Type> types)
Defines a method variable to be declared by the currently defined method.- Parameters:
types
- The type of the exception being declared by the currently defined method.- Returns:
- A new builder that is equal to the current builder but where the currently defined method declares the specified exception type.
-
throwing
DynamicType.Builder.MethodDefinition.ExceptionDefinition<U> throwing(TypeDefinition... type)
Defines a method variable to be declared by the currently defined method.- Parameters:
type
- The type of the exception being declared by the currently defined method.- Returns:
- A new builder that is equal to the current builder but where the currently defined method declares the specified exception type.
-
throwing
DynamicType.Builder.MethodDefinition.ExceptionDefinition<U> throwing(java.util.Collection<? extends TypeDefinition> types)
Defines a method variable to be declared by the currently defined method.- Parameters:
types
- The type of the exception being declared by the currently defined method.- Returns:
- A new builder that is equal to the current builder but where the currently defined method declares the specified exception type.
-
-