Record Class MethodArgsHolder
java.lang.Object
java.lang.Record
org.springframework.integration.gateway.MethodArgsHolder
- Record Components:
method
- the method being invoked.args
- the arguments for the method invocation.
Simple wrapper class containing a
Method
and an object
array containing the arguments for an invocation of that method.
For example, used by a MethodArgsMessageMapper
with this generic
type to provide custom argument mapping when creating a message
in a GatewayProxyFactoryBean
.- Since:
- 3.0
- Author:
- Gary Russell, Artem Bilan
-
Constructor Summary
ConstructorsConstructorDescriptionMethodArgsHolder
(Method method, Object[] args) Creates an instance of aMethodArgsHolder
record class. -
Method Summary
Modifier and TypeMethodDescriptionObject[]
args()
Returns the value of theargs
record component.final boolean
Indicates whether some other object is "equal to" this one.Object[]
getArgs()
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.since 7.0 in favor ofmethod()
.final int
hashCode()
Returns a hash code value for this object.method()
Returns the value of themethod
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
MethodArgsHolder
-
-
Method Details
-
getMethod
Deprecated, for removal: This API element is subject to removal in a future version.since 7.0 in favor ofmethod()
.Return the method being invoked.- Returns:
- the method being invoked.
-
getArgs
Deprecated, for removal: This API element is subject to removal in a future version.since 7.0 in favor ofmethod()
.Return the arguments for the method invocation.- Returns:
- the arguments for the method invocation.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
method
-
args
-
method()
.