matlab.metadata.EnumerationMember Class
Namespace: matlab.metadata
Superclasses: matlab.metadata.MetaData
Describe enumeration member of MATLAB class
Renamed from meta.EnumeratedValue
in R2024a
Description
The matlab.metadata.EnumerationMember
class contains information about
enumeration members defined by MATLAB® classes. The properties of a matlab.metadata.EnumerationMember
object correspond to the attributes of the enumeration member being described.
All matlab.metadata.EnumerationMember
properties are read-only. Query the
matlab.metadata.EnumerationMember
object to obtain information about the
enumeration member it describes.
The matlab.metadata.EnumerationMember
class is a handle
class.
Class Attributes
Abstract | true |
ConstructOnLoad | true |
For information on class attributes, see Class Attributes.
Creation
Obtain a matlab.metadata.EnumerationMember
object from the
EnumerationMemberList
property of a
matlab.metadata.Class
object. EnumerationMemberList
is
an array of matlab.metadata.EnumerationMember
instances, one per enumeration
member.
Properties
Examples
List Enumeration Member Names
Use the EnumerationMemberList
property of a
matlab.metadata.Class
instance to get the names of the enumeration
members defined in the matlab.lang.OnOffSwitchState
enumeration
class.
mc = ?matlab.lang.OnOffSwitchState; mc.EnumerationMemberList.Name
ans = 'off' ans = 'on'