User`s manual
5 Calling Java from MATLAB
5-18
frameClass = class(frame)
frameClass =
java.awt.Frame
Because this form of class also works on MATLAB objects, it does not, in itself,
tell you whether it is a Java class. To determine the type of class, use the
isjava function, which has the form
x = isjava(obj)
isjava
returns 1 if obj is Java, and 0 if it is not.
isjava(frame)
ans =
1
To find out whether or not an object is an instance of a specified class, use the
isa function, which has the form
x = isa(obj, 'class_name')
isa
returns 1 if obj is an instance of the class named ’class_name’, and 0 if it
is not. Note that
’class_name’ can be a MATLAB built-in or user-defined class,
as well as a Java class.
isa(frame, 'java.awt.Frame')
ans =
1