Known classdef limitations.
📄Description

Nelson supports many classdef features: value and handle classes, single or multiple inheritance, declared properties, abstract properties, dependent, constant, observable, transient, and non-copyable properties, default values, dimension, type, and function validation (including validators referencing the property name), instance, static, abstract, sealed, and hidden methods, restricted constructors (Access on the constructor), single-line methods, get.PropertyName and set.PropertyName accessors, packages, separate method files, ... continuation, events and listeners (with addlistener binding the listener lifetime to the source object), event.EventData subclasses for typed payloads, ListenAccess, NotifyAccess, and Hidden event attributes, mixin base classes (nelson.mixin.Copyable, nelson.mixin.CustomDisplay, nelson.mixin.SetGet, nelson.mixin.Heterogeneous), enumerations with constructor arguments, numeric enumeration base types, subclassing built-in numeric, logical, and char types, object arrays (including reshape, permute, and isequal), ClassName.empty(...), simple indexing hooks, persistence hooks, dynamic handle properties, and metadata queries returning meta.class objects.

The main help pages document the supported behavior: classdef describes syntax and attributes, classdef_tutorial gives basic examples, metaclass describes metadata structures, events describes event visibility, and dynamicprops describes instance dynamic properties.

This page lists documented limits for Nelson. It is a status page, not a complete object-system specification.

Known limitations:

Area Status Notes
Metadata object model meta.* objects metaclass and ?ClassName return meta.class objects whose PropertyList, MethodList, EventList, and EnumerationMemberList are typed meta.property, meta.method, meta.event, and meta.EnumerationMember arrays. The Nelson-specific ClassDetails, PropertyDetails, MethodDetails, EventDetails, and EnumerationDetails structure properties remain available for compatibility. meta.DynamicProperty is available for instance dynamic property descriptors. Static constructors such as meta.class.fromName are not provided.
Custom indexing method names Partial Traditional overload hooks such as subsref, subsasgn, and end use the common overload machinery. Method-name forms dotReference, dotAssign, parenReference, parenAssign, braceReference, and braceAssign are supported for simple value and handle indexing. Full operation-object indexing customization is not documented as supported.
Method forms Declared or separate Methods in the class file, separate method prototypes, and method files in @ClassName folders are supported. Simple methods written on one line with their body and final end are supported. Abstract methods must remain declarations without a body.
Class attributes Documented Abstract, ConstructOnLoad, Hidden, InferiorClasses, and Sealed are parsed and exposed in metadata. Associated constraints such as not combining Sealed and Abstract are checked.
Property attributes Documented Access, GetAccess, SetAccess, Abstract, AbortSet, Constant, Dependent, GetObservable, SetObservable, Hidden, Transient, NonCopyable, WeakHandle, and validation expressions are supported. An abstract property must not define an initial value. WeakHandle is limited to handle classes, and objects linked by a cycle of strong references are not destroyed.
Method attributes Documented Access, Abstract, Hidden, Sealed, and Static are supported. Private abstract methods are not instantiable in a concrete class; sealed methods cannot be overridden.
Event attributes Documented Events can be declared only by handle subclasses. ListenAccess, NotifyAccess, and Hidden are supported. events and metaclass(...).EventList expose visible public events; EventDetails keeps declared events, including non-public or hidden events.
Class-list access Supported Access attributes accept public, private, protected, one class name such as ?FriendClass, or a list such as {?FriendA, ?FriendB}. Access checks apply to properties, methods, and events.
Object arrays Supported Value and handle class arrays keep class metadata. Indexed expansion initializes missing elements with the default constructor or distinct default handles. ClassName.empty(...) creates typed empty arrays.
Persistence Supported Save and load preserve classdef objects, including objects nested in cells and structs. saveObjectImpl and static loadObjectImpl are applied to scalar objects and element by element for non-empty arrays. Transient properties reload with their default values when possible.
Subclassing built-in data types Numeric, logical, char Value classes can inherit from double, single, integer types, logical, and char. The base data is initialized with obj = obj@double(...); arithmetic, indexing, concatenation, and shape operations return the subclass, conversions return the base type, and type predicates follow the base type. Subclassing container types (cell, struct) is not supported.
Dynamic properties Handle classes only Instance dynamic properties require a handle class that inherits from dynamicprops. Dynamic property descriptors support access flags, callbacks, dependent accessors, validation, common storage flags, and persisted stored values. Declared class properties cannot be removed with rmprop.
Table custom properties Separate API addprop and rmprop also exist for tables with a different signature. That mechanism adds custom properties to table metadata and does not return a meta.DynamicProperty descriptor.
Completion, debugger, and profiler Nelson integration Classdef objects are supported by the existing Nelson tools. The exposed metadata interfaces remain the structures documented by metaclass.
Status tracking Test based Before adding or removing a limitation, verify the current behavior against Nelson classdef tests and the related help pages.
🔗See Also
classdefclassdef tutorialmetaclasspropertieseventsdynamicprops
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub