Module org.htmlunit.corejs
Interface VariableTypeInfo
- All Superinterfaces:
TypeInfo
- All Known Implementing Classes:
VariableTypeInfoImpl
a
TypeInfo implementation representing TypeVariable- 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 Class<?>asClass()bounds(TypeInfoFactory factory) default intdefault booleanisArray()default booleandefault booleanisByte()default booleandefault booleanisDouble()default booleanisEnum()default booleanisFloat()default booleanisInt()default booleandefault booleanisLong()default booleanisNumber()default booleandefault booleanisShort()default booleanisString()default booleanisVoid()The main bound is what aTypeVariablewill become when converted to aClass, aka what this type should be after Java erased generic type infoname()default booleanMethods inherited from interface org.htmlunit.corejs.javascript.lc.type.TypeInfo
consolidate, createDefaultValue, enumConstants, getComponentType, is, isAssignableFrom, isFunctionalInterface, isInstance, isNot, isPrimitive, newArray, param, toString, toString
-
Method Details
-
name
String name()- See Also:
-
bounds
- See Also:
-
mainBound
TypeInfo mainBound()The main bound is what aTypeVariablewill become when converted to aClass, aka what this type should be after Java erased generic type infofor
T, the main bound will beObject, forT extends XXX, the main bound will beXXX, forT extends XXX & YYY & ZZZthe main bound will still beXXX- See Also:
-
shouldReplace
default boolean shouldReplace()- Specified by:
shouldReplacein interfaceTypeInfo- Returns:
trueif this type contains too little information (e.g. beingTypeInfo.NONE) and should be replaced by actual object type,falseotherwise
-
isEnum
default boolean isEnum() -
isInterface
default boolean isInterface()- Specified by:
isInterfacein interfaceTypeInfo- See Also:
-
asClass
Description copied from interface:TypeInfo -
isObjectExact
default boolean isObjectExact()- Specified by:
isObjectExactin interfaceTypeInfo- Returns:
- true if this TypeInfo represents
Objectclass
-
isNumber
default boolean isNumber() -
getTypeTag
default int getTypeTag()- Specified by:
getTypeTagin interfaceTypeInfo- See Also:
-
isVoid
default boolean isVoid() -
isBoolean
default boolean isBoolean() -
isByte
default boolean isByte() -
isShort
default boolean isShort() -
isInt
default boolean isInt() -
isLong
default boolean isLong() -
isFloat
default boolean isFloat() -
isDouble
default boolean isDouble() -
isCharacter
default boolean isCharacter()- Specified by:
isCharacterin interfaceTypeInfo- Returns:
- true if this TypeInfo represents
Characterclass orcharclass
-
isString
default boolean isString() -
isArray
default boolean isArray()
-