cn.dreampie.common.util.analysis
类 ParamNamesScaner

java.lang.Object
  继承者 cn.dreampie.common.util.analysis.ParamNamesScaner

public class ParamNamesScaner
extends Object

Created by wangrenhui on 14/12/19.


构造方法摘要
ParamNamesScaner()
           
 
方法摘要
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,ParamAttribute> getParamNames(Class<?> clazz)
          获取一个类的所有方法/构造方法的形参名称Map 如果有任何IO异常,不应该有,如果是本地文件,那100%遇到bug了
static ParamAttribute getParamNames(Constructor<?> constructor)
          获取Constructor的形参名称列表
static ParamAttribute getParamNames(Constructor<?> constructor, Map<String,ParamAttribute> classParamNames)
          获取Constructor的形参名称列表
static Map<String,ParamAttribute> getParamNames(InputStream in)
           
static ParamAttribute getParamNames(Method method)
          获取Method的形参名称列表
static ParamAttribute getParamNames(Method method, Map<String,ParamAttribute> classParamNames)
          获取Method的形参名称列表
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

ParamNamesScaner

public ParamNamesScaner()
方法详细信息

getParamNames

public static ParamAttribute getParamNames(Method method)
获取Method的形参名称列表

参数:
method - 需要解析的方法
返回:
形参名称列表, 如果没有调试信息, 将返回null

getParamNames

public static ParamAttribute getParamNames(Method method,
                                           Map<String,ParamAttribute> classParamNames)
获取Method的形参名称列表

参数:
method - 需要解析的方法
classParamNames - class所有的参数信息
返回:
形参名称列表, 如果没有调试信息, 将返回null

getParamNames

public static ParamAttribute getParamNames(Constructor<?> constructor)
获取Constructor的形参名称列表

参数:
constructor - 需要解析的构造函数
返回:
形参名称列表, 如果没有调试信息, 将返回null

getParamNames

public static ParamAttribute getParamNames(Constructor<?> constructor,
                                           Map<String,ParamAttribute> classParamNames)
获取Constructor的形参名称列表

参数:
constructor - 需要解析的构造函数
classParamNames - class所有的参数信息
返回:
形参名称列表, 如果没有调试信息, 将返回null

getParamNames

public static Map<String,ParamAttribute> getParamNames(Class<?> clazz)
获取一个类的所有方法/构造方法的形参名称Map 如果有任何IO异常,不应该有,如果是本地文件,那100%遇到bug了

参数:
clazz - 需要解析的类
返回:
所有方法/构造方法的形参名称Map

getParamNames

public static Map<String,ParamAttribute> getParamNames(InputStream in)
                                                throws IOException
抛出:
IOException

getKey

public static String getKey(Object obj)
传入Method或Constructor,获取getParamNames方法返回的Map所对应的key


getDescriptor

public static void getDescriptor(StringBuilder sb,
                                 Method method)

getDescriptor

public static void getDescriptor(StringBuilder sb,
                                 Constructor<?> constructor)

getDescriptor

public static void getDescriptor(StringBuilder buf,
                                 Class<?> c)
本方法来源于ow2的asm库的Type类



Copyright © 2015. All rights reserved.