public interface WildcardType
implements Type
| java.lang.reflect.WildcardType |
WildcardType表示一个通配符型表达,如 ? , ? extends Number ,或 ? super Integer 。
公共方法(Public methods) |
|
|---|---|
abstract Type[] |
getLowerBounds() 返回表示此类型变量下限的 |
abstract Type[] |
getUpperBounds() 返回表示此类型变量上限的 |
Type[] getLowerBounds ()
返回表示此类型变量下限的Type对象数组。 请注意,如果没有明确声明下限,则下限是null的类型。 在这种情况下,返回一个零长度的数组。
对于每个下限B:
ParameterizedType for the details of the creation process for parameterized types). | 返回(Returns) | |
|---|---|
Type[] |
an array of Types representing the lower bound(s) of this type variable |
| 抛出异常(Throws) | |
|---|---|
TypeNotPresentException |
if any of the bounds refers to a non-existent type declaration |
MalformedParameterizedTypeException |
if any of the bounds refer to a parameterized type that cannot be instantiated for any reason |
Type[] getUpperBounds ()
返回表示此类型变量上限的Type对象的数组。 请注意,如果没有明确声明上限,则上限为Object 。
对于每个上限B:
ParameterizedType for the details of the creation process for parameterized types). | 返回(Returns) | |
|---|---|
Type[] |
an array of Types representing the upper bound(s) of this type variable |
| 抛出异常(Throws) | |
|---|---|
TypeNotPresentException |
if any of the bounds refers to a non-existent type declaration |
MalformedParameterizedTypeException |
if any of the bounds refer to a parameterized type that cannot be instantiated for any reason |