// It panics if i is not in the range [0, NumMethod()).
//
// For a non-interface type T or *T, the returned Method's Type and Func
- // fields describe a function whose first argument is the receiver.
+ // fields describe a function whose first argument is the receiver,
+ // and only exported methods are accessible.
//
// For an interface type, the returned Method's Type field gives the
// method signature, without a receiver, and the Func field is nil.
//
- // Only exported methods are accessible and they are sorted in
- // lexicographic order.
+ // Methods are sorted in lexicographic order.
Method(int) Method
// MethodByName returns the method with that name in the type's
// method signature, without a receiver, and the Func field is nil.
MethodByName(string) (Method, bool)
- // NumMethod returns the number of exported methods in the type's method set.
+ // NumMethod returns the number of methods accessible using Method.
+ //
+ // Note that NumMethod counts unexported methods only for interface types.
NumMethod() int
// Name returns the type's name within its package for a defined type.