UIINSPECT - display methods, properties & callbacks of an object
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); % Matlab root (desktop) handle
hFig = uiinspect(handle(0));
hFig = uiinspect(gcf); % Figure handle
hFig = uiinspect(handle(gcf));
uiinspect(get(gcf,'JavaFrame'));
uiinspect(classhandle(handle(gcf))); % UDD handle
uiinspect(findprop(handle(gcf),'MenuBar')); % Meta-data handle
uiinspect('java.lang.String'); % Java class name
uiinspect(java.lang.String('yes')); % Java class object reference
uiinspect(actxserver('Excel.Application')); % COM/ActiveX object
uiinspect(Employee) % Matlab class object
uiinspect(?handle) % Matlab metaclass object
uiinspect('meta.class') % Matlab class name
uiinspect(System.Diagnostics.Process.GetCurrentProcess) % Dot-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)
Cite As
Yair Altman (2022). UIINSPECT - display methods, properties & callbacks of an object (https://www.mathworks.com/matlabcentral/fileexchange/17935-uiinspect-display-methods-properties-callbacks-of-an-object), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > App Building >
- MATLAB > Graphics > Graphics Objects > Graphics Object Properties >
- AI, Data Science, and Statistics > Deep Learning Toolbox > Function Approximation, Clustering, and Control > Function Approximation and Clustering > Define Shallow Neural Network Architectures >
- MATLAB > External Language Interfaces > COM with MATLAB > Use COM Objects in MATLAB >
Tags
Acknowledgements
Inspired by: findjobj - find java handles of Matlab graphic objects
Inspired: findjobj - find java handles of Matlab graphic objects, checkClass - inspect a Java/Matlab/Python/COM/C++/.NET class, getundoc - get undocumented object properties, convert objects to string, propertiesGUI - display data in editable context-aware table, Programmatically scroll Variables Editor, Figure from text file (supports HTML tags), checkVersion - Check for a newer file version on the File Exchange, scatool
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.