Method Access List
This class declares an access list for the method Access attribute:
classdef MethodAccess methods (Access = {?ClassA, ?ClassB, ?MethodAccess}) function listMethod(obj) ... end end end
The MethodAccess class specifies the following method access:
Access to
listMethodfrom an instance ofMethodAccessby methods of the classesClassAandClassB.Access to
listMethodfrom an instance ofMethodAccessby methods of subclasses ofMethodAccess, because of the inclusion ofMethodAccessin the access list.Subclasses of
ClassAandClassBare allowed to define a method namedlistMethod, andMethodAccessis allowed to redefinelistMethod. However, ifMethodAccesswas not in the access list, its subclasses could not redefinelistMethod.