public class Classes extends Object
依赖javassit的工具类,获取方法的参数名
| 限定符和类型 | 方法和说明 |
|---|---|
static String[] |
getMethodParamNames(Class<?> clazz,
String method)
获取方法参数名称,匹配同名的某一个方法
|
static String[] |
getMethodParamNames(Class<?> clazz,
String method,
Class<?>... paramTypes)
获取方法参数名称,按给定的参数类型匹配方法
|
protected static String[] |
getMethodParamNames(javassist.CtMethod cm)
获取方法参数名称
|
static void |
main(String[] args) |
protected static String[] getMethodParamNames(javassist.CtMethod cm)
获取方法参数名称
cm - Exceptionpublic static String[] getMethodParamNames(Class<?> clazz, String method, Class<?>... paramTypes)
clazz - method - paramTypes - public static String[] getMethodParamNames(Class<?> clazz, String method)
clazz - method - javassist.NotFoundException - 如果类或者方法不存在MissingLVException - 如果最终编译的class文件不包含局部变量表信息public static void main(String[] args)
Copyright © 2022. All rights reserved.