Main Content

matlab.metadata.Namespace Class

Namespace: matlab.metadata
Superclasses: matlab.metadata.MetaData

Describe MATLAB namespace

Renamed from meta.package in R2024a

Description

The matlab.metadata.Namespace class contains information about MATLAB® namespaces. All properties are read-only.

Namespaces can contain classes, functions, and contained namespaces (referred to as inner namespaces). A namespace can also itself be contained by an outer namespace.

The matlab.metadata.Namespace class is a handle class.

Class Attributes

Sealed
true
Abstract
true
RestrictsSubclassing
true
HandleCompatible
true

For information on class attributes, see Class Attributes.

Creation

You cannot instantiate a matlab.metadata.Namespace object directly. Obtain a matlab.metadata.Namespace object from the matlab.metadata.Class Namespace property, which contains a matlab.metadata.Namespace object, or an empty object if the class is not in a namespace.

Properties

expand all

Namespace, returned as a character vector.

Short description of the namespace, returned as a character vector.

This property is not used.

List of classes that are scoped to this namespace, returned as an array of matlab.metadata.Class objects.

List of functions that are scoped to this namespace, returned as an array of matlab.metadata.Method objects.

List of inner namespaces that are contained by this namespace, returned as an array of matlab.metadata.Namespace objects.

Outer namespace that contains this namespace, returned as a matlab.metadata.Namespace object. If this namespace is not contained in another namespace, the matlab.metadata.Namespace object is empty.

Methods

expand all

Examples

Find Names of Classes in Namespace

Use the matlab.metadata.Namespace.fromName method to find the names of the classes contained in the matlab.mixin namespace. Access the matlab.metadata.Class objects in the ClassList property to display a list of the class names.

disp(string({matlab.metadata.Namespace.fromName("matlab.mixin").ClassList.Name})')
    "matlab.mixin.Heterogeneous"
    "matlab.mixin.Copyable"
    "matlab.mixin.SetGet"
    "matlab.mixin.SetGetExactNames"
    "matlab.mixin.CustomDisplay"
    "matlab.mixin.CustomElementSerialization"
    "matlab.mixin.CustomArraySerialization"
    "matlab.mixin.CustomCompactDisplayProvider"
    "matlab.mixin.Scalar"

Version History

Introduced in R2008a

expand all