Class LifecycleMetaData

  • All Implemented Interfaces:
    java.io.Serializable

    public class LifecycleMetaData
    extends java.lang.Object
    implements java.io.Serializable
    Information about lifecycle events for a managed type.
    Author:
    Steve Kim, Abe White
    See Also:
    Serialized Form
    • Method Detail

      • is_activated

        public boolean is_activated()
        Whether the LifeCycleMetaData has had any callbacks or listeners registered. Used for a quick test to determine whether to attempt to fire any events.
        Returns:
        boolean
      • getIgnoreSystemListeners

        public boolean getIgnoreSystemListeners()
        Whether to exclude system listeners from events.
      • setIgnoreSystemListeners

        public void setIgnoreSystemListeners​(boolean ignore)
        Whether to exclude system listeners from events.
      • getIgnoreSuperclassCallbacks

        public int getIgnoreSuperclassCallbacks()
        Whether to exclude superclass callbacks from events.
      • setIgnoreSuperclassCallbacks

        public void setIgnoreSuperclassCallbacks​(int ignore)
        Whether to exclude superclass callbacks from events.
      • getDeclaredCallbacks

        public LifecycleCallbacks[] getDeclaredCallbacks​(int eventType)
        Return the declared callbacks for the given event type.
      • getCallbacks

        public LifecycleCallbacks[] getCallbacks​(int eventType)
        Return all callbacks for the given event type, including superclass callbacks if appropriate.
      • setDeclaredCallbacks

        public void setDeclaredCallbacks​(int eventType,
                                         LifecycleCallbacks[] callbacks,
                                         int highPriority)
        Set the callbacks for the given event type.
        Parameters:
        highPriority - the first N given callbacks are high priority; high priority callbacks will be returned before non-high-priority superclass callbacks
      • getNonPCSuperclassCallbacks

        public LifecycleCallbacks[] getNonPCSuperclassCallbacks​(int eventType)
        Return the callbacks for the non-PC superclass.
      • setNonPCSuperclassCallbacks

        public void setNonPCSuperclassCallbacks​(int eventType,
                                                LifecycleCallbacks[] callbacks,
                                                int highPriority)
        Set the callbacks for the given event type for non-persistent superclass. Note these callbacks will only be used where the non-persistent superclass is the direct ancestor of the described class.
        Parameters:
        highPriority - the first N given callbacks are high priority; high priority callbacks will be returned before non-high-priority superclass callbacks