Main Content

methods

クラスのメソッド名

説明

methods ClassName は、クラス ClassName に対するメソッドの名前を表示します。ClassName が MATLAB® または Java® のクラスである場合、methods は隠されていないパブリック メソッド (スーパークラスから継承したメソッドを含む) のみを表示します。

methods(obj) は、obj のクラスに対するメソッドの名前を表示します。

methods(___,'-full') は、継承情報を含めて、メソッドの全記述を表示します。MATLAB と Java のメソッドの場合には、メソッドの属性とシグネチャの全記述を表示します。このオプションは、シグネチャの異なる重複するメソッド名を削除しません。このオプションは、MATLAB 7.6 より前に定義されたクラスでは機能しません。

m = methods(___) は、メソッド名を文字ベクトルの cell 配列で返します。

すべて折りたたむ

MException クラスのパブリック メソッドを表示します。

methods MException
Methods for class MException:

MException     addCause       addCorrection  eq             getReport      isequal        ne             rethrow        throw          throwAsCaller  

Static methods:

last           

java.lang.String オブジェクトを作成し、そのオブジェクトのパブリック メソッド名を表示します。

s = java.lang.String;
methods(s);
Methods for class java.lang.String:

String               charAt               chars                codePointAt          codePointBefore      codePointCount       codePoints           compareTo            compareToIgnoreCase  concat               contains             contentEquals        copyValueOf          endsWith             equals               equalsIgnoreCase     format               getBytes             getChars             getClass             hashCode             indexOf              intern               isEmpty              join                 lastIndexOf          length               matches              notify               notifyAll            offsetByCodePoints   regionMatches        replace              replaceAll           replaceFirst         split                startsWith           subSequence          substring            toCharArray          toLowerCase          toString             toUpperCase          trim                 valueOf              wait                 

MException クラスのパブリック メソッドをリストし、メソッドのシグネチャを表示します。

methods('MException','-full')
Methods for class MException:

MException lhs1 MException(asciiString rhs1, rhs2)
MException scalar lhs1 addCause(MException scalar rhs1, MException scalar rhs2)
varargout addCorrection(MException rhs1, Correction)
logical scalar lhs1 eq(MException scalar rhs1, MException scalar rhs2)
logical lhs1 eq(MException rhs1, MException rhs2)
logical lhs1 eq(rhs1, rhs2)
unicodeString lhs1 getReport(MException scalar rhs1, asciiString rhs2, rhs3)
logical scalar lhs1 isequal(rhs1, rhs2)
logical scalar lhs1 isequal(MException rhs1, MException rhs2)
logical scalar lhs1 isequal(MException scalar rhs1, MException scalar rhs2)
Static MException scalar lhs1 last(ustringToString scalar rhs1)
logical lhs1 ne(MException rhs1, MException rhs2)
logical lhs1 ne(rhs1, rhs2)
logical scalar lhs1 ne(MException scalar rhs1, MException scalar rhs2)
rethrow(MException scalar rhs1)
throw(MException scalar rhs1)
throwAsCaller(MException scalar rhs1)

MException クラスのパブリック メソッド名を cell 配列に格納します。-full オプションを使用してメソッドのシグネチャを含めます。

m = methods('MException','-full');

入力引数

すべて折りたたむ

クラス名。文字ベクトルまたは string スカラーとして指定します。

データ型: char | string

入力引数と出力引数を含むメソッドの全記述を表示

データ型: char

出力引数

すべて折りたたむ

メソッド名。文字ベクトルの cell 配列として返されます。

詳細

すべて折りたたむ

言語依存

この関数は、Microsoft® .NET Framework に基づくクラスのジェネリック メソッドを表示しません。ジェネリック メソッドの情報を取得するには、製品ドキュメンテーションを使用します。

methods キーワード

methods という語は、MATLAB のクラス定義キーワードでもあります。クラス定義キーワードの詳細については、関数 classdef を参照してください。

リストされたメソッド

この関数は、すべてのメソッドのディレクトリからメソッドをまとめてレポートし、リストから重複するメソッド名をすべて削除します。

拡張機能

バージョン履歴

R2006a より前に導入