Returns an array containing Method objects reflecting all the declared methods of the class or interface represented by this Class object, including public, protected, default (package) access, and private methods, but excluding inherited methods.
返回一個數(shù)組,包含類或接口聲明的方法對象: 包含 public、protected、package(缺省的),以及 private 方法,但不包含繼承的方法;
If this Class object represents a type that has multiple declared methods with the same name and parameter types, but different return types, then the returned array has a Method object for each such method.
如果這個對象中有同名方法, 有同名同類型的參數(shù)但返回不同的類型, 則返回的數(shù)組中,每個方法對應(yīng)一個Method對象;
If this Class object represents a type that has a class initialization method <clinit>, then the returned array does not have a corresponding Method object.
如果這個對象有類的初始化方法<cinit>,則返回的數(shù)組中不包含此方法;
If this Class object represents a class or interface with no declared methods, then the returned array has length 0.
如果這個類對象表示沒有聲明方法的類或接口,返回數(shù)組的程度為0;
If this Class object represents an array type, a primitive type, or void, then the returned array has length 0.
如果這個類對象表示數(shù)組類型、基本類型或void,則返回的數(shù)組長度為0。
The elements in the returned array are not sorted and are not in any particular order.
返回的數(shù)組中的元素沒有排序,也沒有任何特定的順序。