Module org.htmlunit.corejs
Interface ParameterizedTypeInfo
- All Superinterfaces:
TypeInfo
- All Known Implementing Classes:
ParameterizedTypeInfoImpl
a
TypeInfo implementation representing ParameterizedType- Author:
- ZZZank
- See Also:
-
Field Summary
Fields inherited from interface org.htmlunit.corejs.javascript.lc.type.TypeInfo
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 -
Method Summary
Modifier and TypeMethodDescriptiondefault Map<VariableTypeInfo,TypeInfo> Extract consolidation mapping based onparams()andClass.getTypeParameters()default intnone of the base types is parameterized, unless this object is an implementation ofScriptablewith type variables, which is incredibly rare but still possibledefault booleanisAssignableFrom(TypeInfo another) default booleandefault booleanisInstance(Object o) default booleandefault TypeInfoparam(int index) Example:params()rawType()Methods inherited from interface org.htmlunit.corejs.javascript.lc.type.TypeInfo
asClass, consolidate, createDefaultValue, enumConstants, getComponentType, is, isArray, isBoolean, isByte, isCharacter, isDouble, isEnum, isFloat, isInt, isLong, isNot, isNumber, isObjectExact, isPrimitive, isShort, isString, isVoid, newArray, shouldReplace, toString, toString
-
Method Details
-
rawType
TypeInfo rawType()- See Also:
-
params
-
param
Description copied from interface:TypeInfoExample:1. for
Map<String, Integer>,param(-1)==TypeInfo.NONE,param(0)==TypeInfo.STRING,param(1)==TypeInfo.INT,param(2)==TypeInfo.NONE2. for
Map(raw usage of generic class) orInteger(not generic class),param(anyNumberHere)==TypeInfo.NONE- Specified by:
paramin interfaceTypeInfo- Returns:
- the actual type parameter at provided index, or
TypeInfo.NONEif:1. index not in valid range, or
2. the TypeInfo itself is not representing a
ParameterizedType - See Also:
-
ownerType
TypeInfo ownerType()- See Also:
-
extractConsolidationMapping
Extract consolidation mapping based onparams()andClass.getTypeParameters()Example:
typeisList<String>, calling((ParameterizedTypeInfo) type).extractConsolidationMapping(TypeInfoFactory.GLOBAL)will giveE -> String, where theEthe type variable declared byList -
isInterface
default boolean isInterface()- Specified by:
isInterfacein interfaceTypeInfo- See Also:
-
isFunctionalInterface
default boolean isFunctionalInterface()- Specified by:
isFunctionalInterfacein interfaceTypeInfo- See Also:
-
isAssignableFrom
- Specified by:
isAssignableFromin interfaceTypeInfo- Returns:
trueif the caller TypeInfo represents the super class of the class represented byanotherTypeInfo- See Also:
-
isInstance
- Specified by:
isInstancein interfaceTypeInfo- Returns:
- true if
ois an instance of this class represented by the caller TypeInfo - See Also:
-
getTypeTag
default int getTypeTag()none of the base types is parameterized, unless this object is an implementation ofScriptablewith type variables, which is incredibly rare but still possible- Specified by:
getTypeTagin interfaceTypeInfo- See Also:
-