org.mentawai.util
Class FindMethod
java.lang.Object
org.mentawai.util.FindMethod
public class FindMethod
- extends Object
Find method with polymorphism!
Class.getMethod only finds an exact match.
- Author:
- Jon Skeet (http://groups.google.com/group/comp.lang.java.programmer/browse_thread/thread/921ab91865c8cc2e/9e141d3d62e7cb3f)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FindMethod
public FindMethod()
getMethod
public static Method getMethod(Class<? extends Object> source,
String name,
Class[] parameterTypes)
throws NoSuchMethodException
- Finds the most specific applicable method
- Parameters:
source - Class to find method inname - Name of method to findparameterTypes - Parameter types to search for
- Throws:
NoSuchMethodException
getDeclaredMethod
public static Method getDeclaredMethod(Class source,
String name,
Class[] parameterTypes)
throws NoSuchMethodException
- Finds the most specific applicable declared method
- Parameters:
source - Class to find method inname - Name of method to findparameterTypes - Parameter types to search for
- Throws:
NoSuchMethodException
Copyright © 2011. All Rights Reserved.