Package net.bytebuddy.implementation
Class ExceptionMethod.ConstructionDelegate.ForDefaultConstructor
java.lang.Object
net.bytebuddy.implementation.ExceptionMethod.ConstructionDelegate.ForDefaultConstructor
- All Implemented Interfaces:
ExceptionMethod.ConstructionDelegate
- Enclosing interface:
- ExceptionMethod.ConstructionDelegate
@Enhance
public static class ExceptionMethod.ConstructionDelegate.ForDefaultConstructor
extends Object
implements ExceptionMethod.ConstructionDelegate
A construction delegate that calls the default constructor.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.ExceptionMethod.ConstructionDelegate
ExceptionMethod.ConstructionDelegate.ForDefaultConstructor, ExceptionMethod.ConstructionDelegate.ForStringConstructor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MethodDescription
The constructor that is used for creating the exception.private final TypeDescription
The type of the exception that is to be thrown. -
Constructor Summary
ConstructorsConstructorDescriptionForDefaultConstructor
(TypeDescription throwableType) Creates a new construction delegate that calls a default constructor. -
Method Summary
Modifier and TypeMethodDescriptionmake()
Creates a stack manipulation that creates pushes all constructor arguments onto the operand stack and subsequently calls the constructor.
-
Field Details
-
throwableType
The type of the exception that is to be thrown. -
targetConstructor
The constructor that is used for creating the exception.
-
-
Constructor Details
-
ForDefaultConstructor
Creates a new construction delegate that calls a default constructor.- Parameters:
throwableType
- The type of theThrowable
.
-
-
Method Details
-
make
Creates a stack manipulation that creates pushes all constructor arguments onto the operand stack and subsequently calls the constructor.- Specified by:
make
in interfaceExceptionMethod.ConstructionDelegate
- Returns:
- A stack manipulation for constructing a
Throwable
.
-