Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Method Information

Display Method Names

The methods function returns information on methods of MATLAB® and Java® classes.

To return the names of all the methods (including inherited methods) of the class, use methods without the '-full' qualifier. Names of overloaded methods are listed only once.

Display Method Signatures

With the '-full' qualifier, methods returns a listing of the method names (including inherited methods) along with attributes, argument lists, and inheritance information on each. Each overloaded method is listed separately.

For example, display a full description of all methods of the java.awt.Dimension object.

methods java.awt.Dimension -full
Methods for class java.awt.Dimension:
Dimension() 
Dimension(java.awt.Dimension) 
Dimension(int,int) 
java.lang.Class getClass()  % Inherited from java.lang.Object 
int hashCode()  % Inherited from java.lang.Object 
boolean equals(java.lang.Object) 
java.lang.String toString() 
void notify()  % Inherited from java.lang.Object 
void notifyAll()  % Inherited from java.lang.Object 
void wait(long) throws java.lang.InterruptedException 
   % Inherited from java.lang.Object
void wait(long,int) throws java.lang.InterruptedException 
   % Inherited from java.lang.Object 
void wait() throws java.lang.InterruptedException 
   % Inherited from java.lang.Object 
java.awt.Dimension getSize() 
void setSize(java.awt.Dimension) 
void setSize(int,int)

Display Syntax in Figure Window

To see methods implemented by a particular Java (or MATLAB) class, use the methodsview function. Specify the class name (along with its package name, for Java classes) in the command line. If you have imported the package that defines this class, then the class name alone suffices.

The following command lists information on all methods in the java.awt.MenuItem class. Type:

methodsview java.awt.MenuItem

A new window appears, listing one row of information for each method in the class.

Each row in the window displays up to six fields of information describing the method. This table lists the fields displayed in the methodsview window along with a description and examples of each field type.

Fields Displayed in methodsview Window

Field NameDescriptionExamples

Qualifiers

Method type qualifiers

abstract, synchronized

Return Type

Type returned by the method

void, java.lang.String

Name

Method name

addActionListener, dispatchEvent

Arguments

Types of arguments passed to method

boolean, java.lang.Object

Other

Other relevant information

throws java.io.IOException

Inherited From

Parent of the specified class

java.awt.MenuComponent

See Also

|

Was this topic helpful?