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

Version 1.41 (83,3 ko) par Yair Altman
Inspect a Java/MCOS/Python/C++/.NET object or classname and display its methods, properties, events, superclasses, subclasses, constants etc
2K téléchargements
Mise à jour 26 avr. 2024

Afficher la licence

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 GUI-based 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(objectReference)
checkClass(className)
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)

Citation pour cette source

Yair Altman (2024). 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. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R2008a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
1.41

improved display of class property/method descriptions

1.40

fixed display of properties in abstract classes; fixed display of default empty char array value; fixed display of classes with no properties

1.39.0.0

display newlines in main description (unlike in methods/properties/events); display dynamic Python properties; strip irrelevant content from descriptive comments; fixed display of array DefaultValue; added separate display of MCOS constants

1.38.0.0

displayed methods descriptions & attributes where available; distinguished between Python package/module; minor display improvements

1.37.0.0

improved Python support; clarified display of redefined methods; removed display of missing superclass constructors; fixed some cases of enumerated values; improved display of MCOS property meta-data and enumeration values

1.35.0.0

minor fixes to multi-line method/property descriptions (where available); ignored description changes when comparing class to superclass; merged GetAccess+SetAccess modifiers where possible; de-hyperlinked i.e.,e.g.

1.34.0.0

Fixed code origin of packages that have no classes; improved display of function/method args in certain cases; fixed properties PartialMatchPriority display; added underlying MCOS enum values; fixed case of duplicate methods

1.33.0.0

added package-level function info; added enumeration underlying values; added MS doc link & assembly info for .NET clases; hyperlinked code origin; return class metadata; several small fixes

1.32.0.0

*** MAJOR UPDATE *** - added MCOS package & origin info; added javadoc link for Java classes; many fixes to superclasses, methods, description, hyperlinks; changed default level

1.31.0.0

improved display of class description, no-arg methods, DefaultValue etc.

1.30.0.0

improved display of Java Enums and Java classloader info; extended property information (type, validations, default value); avoid field lengths warnings

1.28.0.0

handled case of javahandle* objects

1.27.0.0

fixed a couple of edge cases

1.26.0.0

improved display of class hierarchies; fixes for MCOS classes

1.25.0.0

fixed some edge cases; improved the display of multiple super-classes

1.23.0.0

attribution of whereisjavaclassloadingfrom created by Andrew Janke

1.22.1.0

fixed the downloadable file

1.22.0.0

added display of class origin information; fixed report for some .Net classes that are reported as A*B*C; fixed some edge cases

1.19.0.0

fixed java annotations

1.7.0.0

handle missing/string input; handle MCOS objects

1.6.0.0

fixed edge case

1.5.0.0

enabled checking Matlab-wrapped (javahandle_withcallbacks) handles; displayed function return values & qualifiers; fixed dot-notation internal classes; fixed a few edge-case bugs; added hyperlinks to user-generated subclasses (myclass$subclass)

1.4.0.0

fixed problem when directly specifying requested superclass level; fixed static fields value display; fixed minor bug with non-derived class

1.2.0.0

linked to checkClass (not uiinspect); fixed some edge cases; displayed superclass for non-Matlab classes; displayed class modifiers

1.1.0.0

displayed static field values; fixed minor bug; displayed missing/extra constructors

1.0.0.0