Module org.pdfsam.eventstudio
Package org.pdfsam.eventstudio
Record Class Listeners.ReflectiveListenerWrapper
java.lang.Object
java.lang.Record
org.pdfsam.eventstudio.Listeners.ReflectiveListenerWrapper
- All Implemented Interfaces:
Listeners.ListenerWrapper
- Enclosing class:
Listeners
private static record Listeners.ReflectiveListenerWrapper(Object bean, Method method)
extends Record
implements Listeners.ListenerWrapper
Reflective invocation of an annotated listener
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateReflectiveListenerWrapper(Object bean, Method method) Creates an instance of aReflectiveListenerWrapperrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbean()Returns the value of thebeanrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.method()Returns the value of themethodrecord component.voidfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
bean
The field for thebeanrecord component. -
method
The field for themethodrecord component.
-
-
Constructor Details
-
ReflectiveListenerWrapper
Creates an instance of aReflectiveListenerWrapperrecord class.- Parameters:
bean- the value for thebeanrecord componentmethod- the value for themethodrecord component
-
-
Method Details
-
onEvent
- Specified by:
onEventin interfaceListeners.ListenerWrapper
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
bean
Returns the value of thebeanrecord component.- Returns:
- the value of the
beanrecord component
-
method
Returns the value of themethodrecord component.- Returns:
- the value of the
methodrecord component
-