Class EventListenerMetaData

  • All Implemented Interfaces:
    java.io.Serializable

    public class EventListenerMetaData
    extends MetaData
    Listener for events, following the JPA/Jakarta model.
    See Also:
    Serialized Form
    • Field Detail

      • className

        java.lang.String className
        Name of the EventListener class.
      • methodNamesByCallbackName

        java.util.Map<java.lang.String,​java.lang.String> methodNamesByCallbackName
        Method names in the EventListener class keyed by their callback name (e.g javax.persistence.PrePersist, etc).
    • Constructor Detail

      • EventListenerMetaData

        public EventListenerMetaData​(java.lang.String className)
        Constructor for an EventListener MetaData
        Parameters:
        className - Name of the EventListener class
    • Method Detail

      • getClassName

        public java.lang.String getClassName()
        Accessor for the name of the EventListener class
        Returns:
        Name of the EventListener
      • addCallback

        public void addCallback​(java.lang.String callbackClassName,
                                java.lang.String methodName)
        Method to add a method name for this EventListener.
        Parameters:
        callbackClassName - Name of the callback type (javax.persistence.PrePersist etc)
        methodName - The method in the EventListener class that handles it
      • addCallback

        public void addCallback​(java.lang.String callbackClassName,
                                java.lang.String className,
                                java.lang.String methodName)
        Method to add a method name for this EventListener.
        Parameters:
        callbackClassName - Name of the callback class
        className - Name of the class declaring the method
        methodName - The method in the className class that handles it
      • getMethodNameForCallbackClass

        public java.lang.String getMethodNameForCallbackClass​(java.lang.String callbackClassName)
        Accessor for the method name in the EventListener class that handles the specified callback event
        Parameters:
        callbackClassName - Name of the callback class
        Returns:
        The method name (if any). Fully-qualified