public class ClassMetaReader extends Object
构造器和说明 |
---|
ClassMetaReader() |
限定符和类型 | 方法和说明 |
---|---|
static ClassMeta |
build(InputStream in) |
static void |
getDescriptor(StringBuilder buf,
Class<?> c)
本方法来源于ow2的asm库的Type类
|
static void |
getDescriptor(StringBuilder sb,
Constructor<?> constructor) |
static void |
getDescriptor(StringBuilder sb,
Method method) |
static String |
getKey(Object obj)
传入Method或Constructor,获取getParamNames方法返回的Map所对应的key
|
static Map<String,List<String>> |
getParamNames(Class<?> klass)
获取一个类的所有方法/构造方法的形参名称Map
|
public static Map<String,List<String>> getParamNames(Class<?> klass) throws IOException
klass
- 需要解析的类IOException
- 如果有任何IO异常,不应该有,如果是本地文件,那100%遇到bug了public static ClassMeta build(InputStream in) throws IOException
IOException
public static void getDescriptor(StringBuilder sb, Method method)
public static void getDescriptor(StringBuilder sb, Constructor<?> constructor)
public static void getDescriptor(StringBuilder buf, Class<?> c)
Copyright © 2017. All rights reserved.