How to find out if a class is a handle class?
15 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
broken_arrow
am 12 Mär. 2023
Bearbeitet: Matt J
am 15 Mär. 2023
How can I find out if a class is a handle or a value class? Unfortunately I can't seem to figure it out. Take e. g. matlab.mixin.CustomDisplay. The documentation only says it's handle compatible, but not if it is itself a handle class. I need a class that inherits from handle and matlab.mixin.CustomDisplay. So if the latter is itself a handle class, inheriting from handle would be redundant, right?
0 Kommentare
Akzeptierte Antwort
Matt J
am 12 Mär. 2023
Bearbeitet: Matt J
am 15 Mär. 2023
How can I find out if a class is a handle or a value class?
You can use,
isa(obj,'handle')
I need a class that inherits from handle and matlab.mixin.CustomDisplay. So if the latter is itself a handle class, inheriting from handle would be redundant, right?
It would be redundant to inherit both from handle and one of its subclasses. However matlab.mixin.CustomDisplay is not a subclass of handle, so it is not redundant in that case.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Construct and Work with Object Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!