MATLAB Object-Oriented Programming

(Joyce) #1
The metaclass function returns the meta.class object (that is, an object of the
meta.class class). You can obtain other metaclass objects (meta.property,
meta.method, and so on) from the meta.class object.

NoteMetaclass is a term used here to refer to all the classes in the meta package.
meta.class is a class in the meta package whose instances contain information about
MATLAB classes. Metadata is information about classes contained in metaclasses.

Metaclass Object Lifecycle


When you change a class definition, MATLAB reloads the class definition. If instances of
the class exist, MATLAB updates those objects according to the new definition.

However, MATLAB does not update existing metaclass objects to the new class definition.
If you change a class definition while metaclass objects of that class exist, MATLAB
deletes the metaclass objects and their handles become invalid. You must create a new
metaclass object after updating the class.

For information on how to modify and reload classes, see “Automatic Updates for Modified
Classes” on page 5-51.

See Also


Related Examples



  • “Class Introspection with Metadata” on page 16-5

  • “Find Objects with Specific Values” on page 16-10

  • “Get Information About Properties” on page 16-14

  • “Find Default Values in Property Metadata” on page 16-20


16 Information from Class Metadata

Free download pdf