matlab.mixin.indexing.ForbidsPublicDotMethodCall Class
Namespace: matlab.mixin.indexing
Description
Classes that inherit from matlab.mixin.indexing.RedefinesParen or
matlab.mixin.indexing.RedefinesBrace allow method calls using dot notation.
To make such a class mirror the behavior of built-in numeric classes, which disallow method
calls with dot, use the matlab.mixin.indexing.ForbidsPublicDotMethodCall
superclass. For example, obj is an instance of a class that inherits from
RedefinesParen and ForbidsPublicDotMethodCall. The class
defines a public method myMethod:
myMethod(obj)calls the method.obj.myMethoderrors.label="myMethod"; obj.(label)errors.obj(1).myMethodcallsparenReference.label="myMethod"; obj(1).(label)callsparenReference.
ForbidsPublicDotMethodCall cannot be used with classes that inherit from
matlab.mixin.indexing.RedefinesDot or
matlab.mixin.indexing.OverridesPublicDotMethodCall.
Class Attributes
Abstract | true |
HandleCompatible | true |
For information on class attributes, see Class Attributes.
Examples
Version History
Introduced in R2021b