이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.
methods
클래스 메서드(Class Method) 이름
설명
methods
은 ClassName
ClassName
클래스에 대한 메서드의 이름을 표시합니다. ClassName
이 MATLAB® 클래스나 Java® 클래스 중 하나인 경우, methods
는 슈퍼클래스에서 상속된 메서드를 포함하여 숨겨지지 않은 퍼블릭 메서드만 표시합니다.
methods(obj)
는 obj
의 클래스에 대한 메서드의 이름을 표시합니다.
methods(___,
은 상속 정보를 포함하여 메서드에 대한 전체 설명을 표시하고 MATLAB 메서드와 Java 메서드의 경우 메서드 특성과 메서드 시그니처를 표시합니다. 이 옵션은 시그니처가 다른 중복된 메서드 이름은 제거하지 않습니다. 이 옵션은 MATLAB 7.6 이전에 정의된 클래스에서는 사용할 수 없습니다.'-full'
)
예제
클래스 메서드 나열하기
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(MException scalar rhs1, MException scalar rhs2) logical scalar lhs1 isequal(rhs1, rhs2) logical scalar lhs1 isequal(MException rhs1, MException rhs2) Static MException scalar lhs1 last(ustringToString scalar rhs1) logical scalar lhs1 ne(MException scalar rhs1, MException scalar rhs2) logical lhs1 ne(MException rhs1, MException rhs2) logical lhs1 ne(rhs1, rhs2) rethrow(MException scalar rhs1) throw(MException scalar rhs1) throwAsCaller(MException scalar rhs1)
메서드 이름을 셀형 배열로 저장하기
MException 클래스의 퍼블릭 메서드 이름을 셀형 배열로 저장합니다. -full 옵션을 사용하여 메서드 시그니처를 포함합니다.
m = methods('MException','-full');
입력 인수
ClassName
— 클래스 이름
문자형 벡터 | string형 스칼라
클래스 이름으로, 문자형 벡터 또는 string형 스칼라로 지정됩니다.
데이터형: char
| string
'-full'
— 전체 설명 표시
'-full'
입력 인수와 출력 인수를 포함하여, 메서드에 대한 전체 설명을 표시합니다.
데이터형: char
출력 인수
m
— 메서드 이름
셀형 배열
문자형 벡터로 구성된 셀형 배열로 반환되는 메서드 이름입니다.
세부 정보
확장 기능
스레드 기반 환경
MATLAB®의 backgroundPool
을 사용해 백그라운드에서 코드를 실행하거나 Parallel Computing Toolbox™의 ThreadPool
을 사용해 코드 실행 속도를 높일 수 있습니다.
이 함수는 스레드 기반 환경을 완전히 지원합니다. 자세한 내용은 스레드 기반 환경에서 MATLAB 함수 실행하기 항목을 참조하십시오.
버전 내역
R2006a 이전에 개발됨
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)