de.lessvoid.xml.tools
Class MethodResolver

java.lang.Object
  extended by de.lessvoid.xml.tools.MethodResolver

public class MethodResolver
extends Object

MethodResolver helper class.

Author:
void

Method Summary
static String extractArgs(String methodName)
          extract the part within ().
static String[] extractParameters(String methodName)
          extract array of strings encoding in the given method string.
static Method findMethod(Class<?> c, String methodName)
          find a method per name in the given class.
static Method findMethodWithArgs(Class<?> c, String methodName, Class<?>... parameters)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findMethod

public static Method findMethod(Class<?> c,
                                String methodName)
find a method per name in the given class.

Parameters:
c - the class to look for
methodName - the methodName
Returns:
the Method instance

findMethodWithArgs

public static Method findMethodWithArgs(Class<?> c,
                                        String methodName,
                                        Class<?>... parameters)

extractParameters

public static String[] extractParameters(String methodName)
extract array of strings encoding in the given method string.

Parameters:
methodName - method
Returns:
array of strings with actual parameters or empty array

extractArgs

public static String extractArgs(String methodName)
extract the part within ().

Parameters:
methodName - complete methodname with argument list in ()
Returns:
the part within ()


Copyright © 2011. All Rights Reserved.