matlab.metadata.Event Class
Namespace: matlab.metadata
Superclasses: matlab.metadata.MetaData
Description
The matlab.metadata.Event
class provides information about MATLAB® class events. Properties of the matlab.metadata.Event
class
correspond to event attributes and other information that is specified syntactically in the
class definition. All properties are read-only.
The matlab.metadata.Event
class is a handle
class.
Class Attributes
Abstract | true |
ConstructOnLoad | true |
For information on class attributes, see Class Attributes.
Creation
You cannot instantiate a matlab.metadata.Event
object directly. Obtain a
matlab.metadata.Event
object from the matlab.metadata.Class
EventList
property, which contains an array of
matlab.metadata.Event
objects, one for each event defined for the class. For
example, replace ClassName
with the name of the class whose events
you want to query:
mco = ?ClassName; elist = mco.EventList; elist(1); % matlab.metadata.Event for first event in list
Use the metaclass
function to obtain a
matlab.metadata.Class
object from a class instance:
mco = metaclass(obj);
Properties
Examples
Find Event NotifyAccess
Find what code can trigger the
ObjectBeingDestroyed
event of the
matlab.mixin.Copyable
class. Use the matlab.metadata.Event
object to determine the event NotifyAccess
.
mc = ?matlab.mixin.Copyable; findobj(mc.EventList,"Name","ObjectBeingDestroyed").NotifyAccess
ans = 'private'