Class.getMethod
Class Overview | Class Members |
This Package |
All Packages
public Method getMethod( String name,
Class parameterTypes[] ) throws NoSuchMethodException, SecurityException
Description
Returns a Method object that reflects the specified public
member method of the class or interface represented by this
Class object. The name parameter is a String specifying the
simple name the desired method, and the parameterTypes
parameter is an array of Class objects that identify the
method's formal parameter types, in declared order.
The method to reflect is located by searching all the member
methods of the class or interface represented by this Class
object for a public method with the specified name and exactly
the same formal parameter types.
See The Java Language Specification, sections 8.2
and 8.4.
Exceptions
NoSuchMethodException
if a matching method is not found.
Exceptions
SecurityException
if access to the information is denied.
See Also
Method