Module org.htmlunit.corejs
Class ParameterizedTypeInfoImpl
java.lang.Object
org.htmlunit.corejs.javascript.lc.type.impl.TypeInfoBase
org.htmlunit.corejs.javascript.lc.type.impl.ParameterizedTypeInfoImpl
- All Implemented Interfaces:
ParameterizedTypeInfo,TypeInfo
-
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 -
Constructor Summary
ConstructorsConstructorDescriptionParameterizedTypeInfoImpl(TypeInfo ownerType, TypeInfo rawType, List<TypeInfo> params) -
Method Summary
Modifier and TypeMethodDescriptionClass<?>asClass()consolidate(Map<VariableTypeInfo, TypeInfo> mapping) booleanExtract consolidation mapping based onParameterizedTypeInfo.params()andClass.getTypeParameters()inthashCode()booleannewArray(int length) get an array whose element type is the caller TypeInfoparam(int index) Example:params()rawType()Methods inherited from class org.htmlunit.corejs.javascript.lc.type.impl.TypeInfoBase
toString, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.htmlunit.corejs.javascript.lc.type.ParameterizedTypeInfo
getTypeTag, isAssignableFrom, isFunctionalInterface, isInstance, isInterfaceMethods inherited from interface org.htmlunit.corejs.javascript.lc.type.TypeInfo
createDefaultValue, enumConstants, getComponentType, isArray, isBoolean, isByte, isCharacter, isDouble, isEnum, isFloat, isInt, isLong, isNot, isNumber, isObjectExact, isPrimitive, isShort, isString, isVoid, shouldReplace, toString, toString
-
Constructor Details
-
ParameterizedTypeInfoImpl
-
-
Method Details
-
asClass
Description copied from interface:TypeInfo -
is
-
ownerType
- Specified by:
ownerTypein interfaceParameterizedTypeInfo- See Also:
-
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 interfaceParameterizedTypeInfo- 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:
-
extractConsolidationMapping
Description copied from interface:ParameterizedTypeInfoExtract consolidation mapping based onParameterizedTypeInfo.params()andClass.getTypeParameters()Example:
typeisList<String>, calling((ParameterizedTypeInfo) type).extractConsolidationMapping(TypeInfoFactory.GLOBAL)will giveE -> String, where theEthe type variable declared byList- Specified by:
extractConsolidationMappingin interfaceParameterizedTypeInfo
-
hashCode
public int hashCode() -
equals
-
rawType
- Specified by:
rawTypein interfaceParameterizedTypeInfo- See Also:
-
params
- Specified by:
paramsin interfaceParameterizedTypeInfo- See Also:
-
newArray
Description copied from interface:TypeInfoget an array whose element type is the caller TypeInfo- Specified by:
newArrayin interfaceTypeInfo- Overrides:
newArrayin classTypeInfoBase
-
consolidate
- Specified by:
consolidatein interfaceTypeInfo
-