MATLAB R2016a introduced a documented mechanism for restricting the class of properties of an object (I know that there is also an older, different, undocumented way to do this, but I do not use this method). For instance:
classdef MyClass
properties
myProperty RestrictedClass
end
end
will restrict the property myProperty
so that its values ββmust be of class RestrictedClass
.
If you have implemented such a class, is there a way to use the MATLAB class metadata interface to programmatically discover a class of restricted property?
I was hoping that if I used
m = ?MyClass;
p = m.PropertyList(1);
then the metaproperty object p
will contain information about the class to which it was limited, but it does not seem to be so.
? - , , .
PS , . , , pcode
.