image thumbnail

checkClass - inspect a Java/Matlab/Python/​COM/C++/.NET class

version 1.38.0.0 (81.8 KB) by Yair Altman
inspect a Java/MCOS/Python/COM/C++/.NET object or name and display its methods, properties, events, superclasses, subclasses, constants etc.

1.9K Downloads

Updated 17 May 2022

View License

checkClass inspects the specified Java, Matlab (MCOS), .NET, Python, C++ (CLib), or COM (ActiveX) object reference or class-name, and reports its superclass(es), interfaces, new/modified methods, super/sub-classes, properties, events, constants, enumerations and annotations.
metadata = checkClass(...) returns a meta.class or meta.package object that encapsulates the input object.
This utility complements the more detailed UIINSPECT utility by being Command-Prompt based and also by highlighting the object components that were modified in the inspected class compared to its parent superclass.
Syntax:
checkClass(className)
checkClass(objectReference)
checkClass(..., level) % default level=1 % Note: changed default in v1.32!
metadata = checkClass(...)
Usage examples:
% Java objects/classes
checkClass('java.lang.String')
checkClass(javax.swing.JButton)
jButton = javax.swing.JButton('Click me!');
jButton.checkClass; % or: checkClass(jButton)
checkClass(com.mathworks.mwswing.MJToolBar)
checkClass(com.mathworks.mde.desk.MLDesktop.getInstance)
% Matlab (MCOS) objects/classes/packages
checkClass(gcf)
checkClass('matlab.ui.Figure')
checkClass matlab.ui.Figure % equivalent to above
checkClass matlab.ui.control % package name (contains classes, sub-packages)
% .NET objects/classes/packages
checkClass('NET.Assembly')
checkClass(System.Diagnostics.Process.GetCurrentProcess)
% Python objects/classes/modules
checkClass('py.inspect')
checkClass(py.importlib.import_module('calendar'))
Technical description:
Bugs and suggestions:
Please send to Yair Altman (altmany at gmail dot com)

Cite As

Yair Altman (2022). checkClass - inspect a Java/Matlab/Python/COM/C++/.NET class (https://www.mathworks.com/matlabcentral/fileexchange/26947-checkclass-inspect-a-java-matlab-python-com-c-net-class), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!