Package org.springframework.aot.agent
Class RecordedInvocation.Builder
java.lang.Object
org.springframework.aot.agent.RecordedInvocation.Builder
- Enclosing class:
- RecordedInvocation
Builder for
RecordedInvocation.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Create aRecordedInvocationbased on the state of this builder.onInstance(Object instance) Set thethisobject instance used for this invocation.returnValue(Object returnValue) Use the given object as the return value for the invocation.withArgument(Object argument) Use the given object as the unique argument.withArguments(Object... arguments) Use the given objects as the invocation arguments.
-
Method Details
-
onInstance
Set thethisobject instance used for this invocation.- Parameters:
instance- the current object instance,nullin case of static invocations- Returns:
this, to facilitate method chaining
-
withArgument
Use the given object as the unique argument.- Parameters:
argument- the invocation argument- Returns:
this, to facilitate method chaining
-
withArguments
Use the given objects as the invocation arguments.- Parameters:
arguments- the invocation arguments- Returns:
this, to facilitate method chaining
-
returnValue
Use the given object as the return value for the invocation.- Parameters:
returnValue- the return value- Returns:
this, to facilitate method chaining
-
build
Create aRecordedInvocationbased on the state of this builder.- Returns:
- a recorded invocation
-