Main Content

meta.package class

Package: meta
Superclasses: meta.MetaData

Describe MATLAB package

Description

The meta.package class contains information about MATLAB® packages. All properties are read-only.

Packages can contain classes, functions, and other packages.

The meta.package class is a handle class.

Class Attributes

Sealed
true
Abstract
true
RestrictsSubclassing
true

For information on class attributes, see Class Attributes.

Creation

You cannot instantiate a meta.package object directly. Obtain a meta.package object from the meta.class ContainingPackage property, which contains a meta.package object, or an empty object, if the class is not in a package.

Properties

expand all

Name of the package, returned as a character vector.

Data Types: char

Returns the name of the package as a character vector.

Data Types: char

This property is not used.

Data Types: char

List of classes that are scoped to this package, returned as an array of meta.class objects.

Data Types: meta.class

List of functions that are scoped to this package, returned as an array of meta.method objects.

Data Types: meta.method

List of packages that are scoped to this package, returned as an array of meta.package objects.

Data Types: meta.package

Package that contains this package, returned as a meta.package object. If this package is not contained in another package, the meta.package object is empty.

Data Types: meta.package

Methods

expand all

Examples

Find Names of Classes in Package

Use the meta.package.fromName method to find the names of the classes contained in the matlab.mixin package. Access the meta.class objects in the ClassList property to display a list of the class names.

disp(string({meta.package.fromName('matlab.mixin').ClassList.Name})')

Version History

Introduced in R2008a