Main Content

meta.EnumeratedValue class

Package: meta
Superclasses: meta.MetaData

Describe enumeration member of MATLAB class

Description

The meta.EnumeratedValue class contains information about enumeration members defined by MATLAB® classes. The properties of a meta.EnumeratedValue object correspond to the attributes of the enumeration member being described.

All meta.EnumeratedValue properties are read-only. Query the meta.EnumeratedValue object to obtain information about the enumeration member it describes.

The meta.EnumeratedValue class is a handle class.

Class Attributes

Abstract
true
ConstructOnLoad
true

For information on class attributes, see Class Attributes.

Creation

Obtain a meta.EnumeratedValue object from the EnumerationMemberList property of a meta.class object. EnumerationMemberList is an array of meta.EnumeratedValue instances, one per enumeration member.

Properties

expand all

Name of the enumeration member, returned as a character vector.

Data Types: char

Short description of the enumeration member, returned as a character vector. For user-defined classes, the text for this property comes from code comments in the enumeration definition. If there are no comments, the property returns an empty character vector. For more information on how to include help text for your enumerations, see Custom Help Text.

Detailed description of the enumeration member, returned as a character vector. For user-defined classes, the text for this property comes from code comments in the enumeration definition. If there are no comments, the property returns an empty character vector. For more information on how to include help text for your enumerations, see Custom Help Text.

Is enumeration member hidden, returned as a logical value.

Class that defines the enumeration, returned as a meta.class object.

Examples

List Enumeration Member Names

Use the meta.class EnumerationMemberList property to get the names of the enumeration members defined in an enumeration class.

mc = ?matlab.lang.OnOffSwitchState;
mc.EnumerationMemberList.Name
ans =

    'off'


ans =

    'on'

Version History

Introduced in R2009b