Access the parameter type of a method reflectively

Posted by kunjaan on Stack Overflow See other posts from Stack Overflow or by kunjaan
Published on 2010-05-31T21:40:08Z Indexed on 2010/05/31 21:43 UTC
Read the original article Hit count: 150

Filed under:
|

I have this but it always returns null

private static String getParameters(Method aMethod) {

    Class<?>[] parameterTypes = aMethod.getParameterTypes();
    for (Class<?> aParam : parameterTypes) {
      System.out.print(aParam.getName());
    }
    return null;
  }

© Stack Overflow or respective owner

Related posts about java

Related posts about reflection