Syntax:
hFig = uiinspect(obj)
Description:
UIINSPECT inspects an object handle (e.g., Java, COM, Handle Graphics, Matlab class, Dot-Net etc.) and displays the inspection results in a unified Matlab window. UIINSPECT displays a unified window with all relevant object methods (as can be displayed via Matlab's methodsview function), properties (as can be displayed via Matlab's inspect function), static fields, and callbacks. UIINSPECT also displays properties and fields that are not normally displayed with Matlab's inspect function. Property meta-data such as type, accessibility, visibility and default value are also displayed.
Unlike Matlab's inspect function, multiple UIINSPECT windows can be opened simultaneously.
Object properties and callbacks may be modified interactively within the UIINSPECT window.
hFig = UIINSPECT returns a handle to the created figure window. UIINSPECT opens a regular Matlab figure window which may be accessed via hFig (unlike Matlab's methodsview function which opens a Java frame that is not easily accessible from Matlab).
Examples:
hFig = uiinspect(0);
hFig = uiinspect(handle(0));
hFig = uiinspect(gcf);
hFig = uiinspect(handle(gcf));
uiinspect(get(gcf,'JavaFrame'));
uiinspect(classhandle(handle(gcf)));
uiinspect(findprop(handle(gcf),'MenuBar'));
uiinspect('java.lang.String');
uiinspect(java.lang.String('yes'));
uiinspect(actxserver('Excel.Application'));
uiinspect(Employee) % a Matlab class object
uiinspect(?handle) % a Matlab metaclass object
uiinspect('meta.class') % a Matlab class name
uiinspect(System.Diagnostics.Process.GetCurrentProcess) % a .Net object
Warning:
This code heavily relies on undocumented and unsupported Matlab functionality. It works on Matlab 7.1 and later releases, but use at your own risk!
Technical explanation and details:
http://undocumentedmatlab.com/blog/uiinspect/
Bugs and suggestions:
Please send to Yair Altman (altmany at gmail dot com) |