org.test4j.datafilling.common
类 AttributeInfo

java.lang.Object
  继承者 org.test4j.datafilling.common.AttributeInfo

public class AttributeInfo
extends Object


构造方法摘要
AttributeInfo()
           
AttributeInfo(Class attrClaz)
           
AttributeInfo(Class pojoClaz, String attrName, Class attrClaz)
           
 
方法摘要
static AttributeInfo exactArgAttributeInfo(Type argType, Map<String,Type> typeArgsMap)
          根据泛型参数类型和泛型名称类型对应表析取泛型具体类型及其泛型参数列表
 Map<String,Type> getArgsTypeMap()
          解析泛型的名称和类型对
eg: T -> String, E -> Enum
 AttributeInfo getArgTypeAttribute(int index, Map<String,Type> typeArgsMap)
          返回第n个泛型参数的具体属性类型
 List<Annotation> getAttrAnnotations()
           
 Type[] getAttrArgs()
           
 Class getAttrClaz()
           
<T> T
getAttributeValue()
          根据属性(getter)返回属性值
 String getAttrName()
           
 ClassFieldInfo getClassInfo()
           
 Class getComponentType()
           
 Field getDeclaredField()
          返回属性字段定义
 Object[] getEnumConstants()
           
 List<Method> getFactoryMethods()
          返回属性类的可能工厂方法
 Class getPojoClaz()
           
 String getPoJoName()
           
 Constructor[] getPublicConstructor()
          返回属性类的public构造函数
 boolean isAbstract()
           
 boolean isArray()
           
 boolean isCollection()
           
 boolean isEmptyArgs()
           
 boolean isEnum()
           
 boolean isInterface()
           
 boolean isJavax()
           
 boolean isMap()
           
 boolean isNestedAttribute()
           
 boolean isObject()
           
 boolean isPrimitive()
           
 boolean isString()
           
<T> T
newInstance()
           
 AttributeInfo setArgsTypeMap(Map<String,Type> argsTypeMap)
           
 AttributeInfo setAttrAnnotations(List<Annotation> attrAnnotations)
           
 AttributeInfo setAttrArgs(Type... arguments)
           
 AttributeInfo setAttrClaz(Class clazz)
           
 AttributeInfo setAttrName(String attrName)
           
 AttributeInfo setPojoClaz(Class pojoClaz)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

AttributeInfo

public AttributeInfo()

AttributeInfo

public AttributeInfo(Class attrClaz)

AttributeInfo

public AttributeInfo(Class pojoClaz,
                     String attrName,
                     Class attrClaz)
方法详细信息

getAttrClaz

public Class getAttrClaz()

setAttrClaz

public AttributeInfo setAttrClaz(Class clazz)

getAttrArgs

public Type[] getAttrArgs()

setAttrArgs

public AttributeInfo setAttrArgs(Type... arguments)

getAttrName

public String getAttrName()

setAttrName

public AttributeInfo setAttrName(String attrName)

getPojoClaz

public Class getPojoClaz()

setPojoClaz

public AttributeInfo setPojoClaz(Class pojoClaz)

getAttrAnnotations

public List<Annotation> getAttrAnnotations()

setAttrAnnotations

public AttributeInfo setAttrAnnotations(List<Annotation> attrAnnotations)

isNestedAttribute

public boolean isNestedAttribute()

getClassInfo

public ClassFieldInfo getClassInfo()

getDeclaredField

public Field getDeclaredField()
                       throws SecurityException,
                              NoSuchFieldException
返回属性字段定义

返回:
抛出:
SecurityException
NoSuchFieldException

getPublicConstructor

public Constructor[] getPublicConstructor()
返回属性类的public构造函数

返回:

getFactoryMethods

public List<Method> getFactoryMethods()
返回属性类的可能工厂方法

返回:

getAttributeValue

public <T> T getAttributeValue()
                    throws InstantiationException,
                           IllegalAccessException
根据属性(getter)返回属性值

返回:
抛出:
InstantiationException
IllegalAccessException

newInstance

public <T> T newInstance()

getComponentType

public Class getComponentType()

getPoJoName

public String getPoJoName()

isCollection

public boolean isCollection()

isPrimitive

public boolean isPrimitive()

isMap

public boolean isMap()

isString

public boolean isString()

isArray

public boolean isArray()

isEnum

public boolean isEnum()

isJavax

public boolean isJavax()

isObject

public boolean isObject()

isEmptyArgs

public boolean isEmptyArgs()

getEnumConstants

public Object[] getEnumConstants()

getArgTypeAttribute

public AttributeInfo getArgTypeAttribute(int index,
                                         Map<String,Type> typeArgsMap)
返回第n个泛型参数的具体属性类型

参数:
index -
typeArgsMap -
返回:

exactArgAttributeInfo

public static AttributeInfo exactArgAttributeInfo(Type argType,
                                                  Map<String,Type> typeArgsMap)
根据泛型参数类型和泛型名称类型对应表析取泛型具体类型及其泛型参数列表

参数:
argType -
typeArgsMap -
返回:

setArgsTypeMap

public AttributeInfo setArgsTypeMap(Map<String,Type> argsTypeMap)

getArgsTypeMap

public Map<String,Type> getArgsTypeMap()
解析泛型的名称和类型对
eg: T -> String, E -> Enum

参数:
genericTypeArgs -
返回:

isInterface

public boolean isInterface()

isAbstract

public boolean isAbstract()


Copyright © 2013. All rights reserved.