public final class ParameterizedTypeInfoImpl extends TypeInfoBase implements ParameterizedTypeInfo
BIG_INT, BOOLEAN, BYTE, CHARACTER, DATE, DOUBLE, FLOAT, INT, LONG, NONE, NUMBER, OBJECT, OBJECT_ARRAY, PRIMITIVE_BOOLEAN, PRIMITIVE_BYTE, PRIMITIVE_CHARACTER, PRIMITIVE_DOUBLE, PRIMITIVE_FLOAT, PRIMITIVE_INT, PRIMITIVE_LONG, PRIMITIVE_SHORT, PRIMITIVE_VOID, RAW_CLASS, RAW_CONSUMER, RAW_ENUM_SET, RAW_FUNCTION, RAW_LIST, RAW_MAP, RAW_OPTIONAL, RAW_PREDICATE, RAW_SET, RAW_SUPPLIER, RUNNABLE, SHORT, STRING, STRING_ARRAY, VOID| Constructor and Description |
|---|
ParameterizedTypeInfoImpl(TypeInfo rawType,
List<TypeInfo> params) |
| Modifier and Type | Method and Description |
|---|---|
void |
append(TypeFormatContext ctx,
StringBuilder builder) |
Class<?> |
asClass()
|
void |
collectComponentClass(Consumer<Class<?>> collector) |
boolean |
equals(Object object) |
int |
hashCode() |
boolean |
is(Class<?> c) |
Object |
newArray(int length)
get an array whose element type is the caller TypeInfo
|
TypeInfo |
param(int index)
Example:
1. for
Map<String, Integer>, param(-1) == TypeInfo.NONE, param(0) == TypeInfo.STRING, param(1) == TypeInfo.INT, param(2) == TypeInfo.NONE
2. for Map (raw usage of generic class) or Integer (not generic class),
param(anyNumberHere) == TypeInfo.NONE |
List<TypeInfo> |
params() |
TypeInfo |
rawType() |
toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetTypeTag, isAssignableFrom, isFunctionalInterface, isInstance, isInterfaceconsolidate, createDefaultValue, enumConstants, getComponentType, isArray, isBoolean, isByte, isCharacter, isDouble, isEnum, isFloat, isInt, isLong, isNot, isNumber, isObjectExact, isPrimitive, isShort, isString, isVoid, shouldConvert, toStringpublic boolean is(Class<?> c)
public TypeInfo param(int index)
TypeInfo1. for Map<String, Integer>, param(-1) == TypeInfo.NONE, param(0) == TypeInfo.STRING, param(1) == TypeInfo.INT, param(2) == TypeInfo.NONE
2. for Map (raw usage of generic class) or Integer (not generic class),
param(anyNumberHere) == TypeInfo.NONE
param in interface ParameterizedTypeInfoparam in interface TypeInfoTypeInfo.NONE if:
1. index not in valid range, or
2. the TypeInfo itself is not representing a ParameterizedType
ParameterizedTypeInfo.params()public void append(TypeFormatContext ctx, StringBuilder builder)
public TypeInfo rawType()
rawType in interface ParameterizedTypeInfoParameterizedType.getRawType()public List<TypeInfo> params()
params in interface ParameterizedTypeInfoParameterizedType.getActualTypeArguments()public Object newArray(int length)
TypeInfonewArray in interface TypeInfonewArray in class TypeInfoBasepublic void collectComponentClass(Consumer<Class<?>> collector)
collectComponentClass in interface TypeInfoCopyright © 2025 HtmlUnit. All rights reserved.