From: Jim Hokanson on
Is it possible to display the methods of an abstract class directly? I've been using methods(class) for other classes but I obviously can't instantiate an instance of the class since it is abstract. I can always dig up a class which implements this class, or have better documentation and use help, but I was wondering if there was any direct way of examining the methods of this class. Thanks.
From: Steven Lord on

"Jim Hokanson" <jah104(a)pitt.com> wrote in message
news:hv40oo$1t8$1(a)fred.mathworks.com...
> Is it possible to display the methods of an abstract class directly? I've
> been using methods(class) for other classes but I obviously can't
> instantiate an instance of the class since it is abstract. I can always
> dig up a class which implements this class, or have better documentation
> and use help, but I was wondering if there was any direct way of examining
> the methods of this class. Thanks.

Two solutions:

The METHODS function can accept either an instance of a class _or the name
of a class_ and will display the methods of that class.

methods('myabstractclass') % Display the methods of the myabstractclass
class

Or, if you're looking to do more in-depth introspection on your class, use
meta-classes.

http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_oop/br8b90p.html

mc = ?myabstractclass

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com