matlab.metadata.Method Class
Namespace: matlab.metadata
Superclasses: matlab.metadata.MetaData
Description
The matlab.metadata.Method class provides information about the methods of
MATLAB® classes. Properties of the matlab.metadata.Method class
correspond to method attributes and other information that is specified syntactically in the
class definition. All properties are read-only.
The matlab.metadata.Method 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.Method object directly. Obtain a
matlab.metadata.Method object from the MethodList
property of a matlab.metadata.Class object. MethodList
contains an array of matlab.metadata.Method objects, one for each class method.
For example, in this code, replace ClassName with the name of
the class whose methods you want to query:
mco = ?ClassName; mlist = mco.MethodList; mlist(1).Name; % name of first method in the list
To obtain a matlab.metadata.Class object from a class instance, use the
metaclass function:
mco = metaclass(obj);