类 TypePath
- java.lang.Object
- org.springframework.asm.TypePath
字段概要
字段 修饰符和类型 字段 说明 static int
ARRAY_ELEMENT
A type path step that steps into the element type of an array type.static int
INNER_TYPE
A type path step that steps into the nested type of a class type.static int
TYPE_ARGUMENT
A type path step that steps into a type argument of a generic type.static int
WILDCARD_BOUND
A type path step that steps into the bound of a wildcard type.
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static TypePath
fromString(String typePath)
Converts a type path in string form, in the format used bytoString()
, into a TypePath object.int
getLength()
Returns the length of this path, i.e. its number of steps.int
getStep(int index)
Returns the value of the given step of this path.int
getStepArgument(int index)
Returns the index of the type argument that the given step is stepping into.String
toString()
Returns a string representation of this type path.
字段详细资料
ARRAY_ELEMENT
public static final int ARRAY_ELEMENT
A type path step that steps into the element type of an array type. SeegetStep(int)
.- 另请参阅:
- 常量字段值
INNER_TYPE
public static final int INNER_TYPE
A type path step that steps into the nested type of a class type. SeegetStep(int)
.- 另请参阅:
- 常量字段值
WILDCARD_BOUND
public static final int WILDCARD_BOUND
A type path step that steps into the bound of a wildcard type. SeegetStep(int)
.- 另请参阅:
- 常量字段值
TYPE_ARGUMENT
public static final int TYPE_ARGUMENT
A type path step that steps into a type argument of a generic type. SeegetStep(int)
.- 另请参阅:
- 常量字段值
方法详细资料
getLength
public int getLength()
Returns the length of this path, i.e. its number of steps.- 返回:
- the length of this path.
getStep
public int getStep(int index)
Returns the value of the given step of this path.- 参数:
index
- an index between 0 andgetLength()
, exclusive.- 返回:
- one of
ARRAY_ELEMENT
,INNER_TYPE
,WILDCARD_BOUND
, orTYPE_ARGUMENT
.
getStepArgument
public int getStepArgument(int index)
Returns the index of the type argument that the given step is stepping into. This method should only be used for steps whose value isTYPE_ARGUMENT
.- 参数:
index
- an index between 0 andgetLength()
, exclusive.- 返回:
- the index of the type argument that the given step is stepping into.
fromString
public static TypePath fromString(String typePath)
Converts a type path in string form, in the format used bytoString()
, into a TypePath object.- 参数:
typePath
- a type path in string form, in the format used bytoString()
. May be null or empty.- 返回:
- the corresponding TypePath object, or null if the path is empty.
toString
public String toString()
Returns a string representation of this type path.ARRAY_ELEMENT
steps are represented with '[',INNER_TYPE
steps with '.',WILDCARD_BOUND
steps with '*' andTYPE_ARGUMENT
steps with their type argument index in decimal form followed by ';'.