Record Class Invoker
java.lang.Object
java.lang.Record
pro.verron.officestamper.core.Invoker
- Record Components:
name- the name of the method to be invoked.args- the arguments for the method invocation.executor- the executor responsible for executing the method.
public record Invoker(String name, Invokers.Args args, org.springframework.expression.MethodExecutor executor)
extends Record
Represents an invoker that encapsulates the name, arguments, and executor of a method
to be invoked.
It acts as a wrapper to facilitate method invocation with specific parameters,
and a dedicated execution strategy.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs anInvokerinstance by extracting the method name, parameter types, and creating a correspondingReflectionExecutorfor the provided object and method.Constructs anInvokerinstance using the provided method name, argument types, and executor.Invoker(String name, Invokers.Args args, org.springframework.expression.MethodExecutor executor) Creates an instance of aInvokerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionargs()Returns the value of theargsrecord component.final booleanIndicates whether some other object is "equal to" this one.org.springframework.expression.MethodExecutorexecutor()Returns the value of theexecutorrecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Invoker
Constructs anInvokerinstance by extracting the method name, parameter types, and creating a correspondingReflectionExecutorfor the provided object and method.- Parameters:
obj- the object on which the method will be invoked.method- the method to be invoked, including its name and parameter types.
-
Invoker
public Invoker(String name, List<Class<?>> args, org.springframework.expression.MethodExecutor executor) Constructs anInvokerinstance using the provided method name, argument types, and executor.- Parameters:
name- the name of the method to be invoked.args- the list of argument types required for the method invocation.executor- the executor responsible for executing the method.
-
Invoker
public Invoker(String name, Invokers.Args args, org.springframework.expression.MethodExecutor executor) Creates an instance of aInvokerrecord class.
-
-
Method Details
-
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). -
name
-
args
-
executor
-