Package de.monticore.types.check
Class SymTypePrimitive
java.lang.Object
de.monticore.types.check.SymTypeExpression
de.monticore.types.check.SymTypePrimitive
- All Implemented Interfaces:
Comparable<SymTypeExpression>
-
Field Summary
FieldsModifier and TypeFieldDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.cannot assume fixed set for all languagesprotected TypeSymbolDeprecated, for removal: This API element is subject to removal in a future version.Fields inherited from class de.monticore.types.check.SymTypeExpression
functionList, LOG_NAME, sourceInfo -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(ISymTypeVisitor visitor) static StringDeprecated, for removal: This API element is subject to removal in a future version.use SymTypeRelationsbooleanDeprecated, for removal: This API element is subject to removal in a future version.only used in 1 test ONCE...Deprecated, for removal: This API element is subject to removal in a future version.Returns an TypeSymbol representing the type Only to be called according toSymTypeExpression.hasTypeInfo()booleanWhether we can call getTypeInfobooleanChecks whether it is an integer type (incl.booleanChecks whether it is a numeric type (incl.booleanAm I primitive? (such as "int") (default: no)voidsetPrimitiveName(String constName) Deprecated, for removal: This API element is subject to removal in a future version.only used in tests in our main projectsstatic StringDeprecated, for removal: This API element is subject to removal in a future version.use SymTypeRelationsMethods inherited from class de.monticore.types.check.SymTypeExpression
_internal_setSourceInfo, asArrayType, asFunctionType, asGenericType, asInferenceVariable, asIntersectionType, asNullType, asNumericWithSIUnitType, asObjectType, asObscureType, asRegExType, asSIUnitType, asTupleType, asTypeVariable, asUnionType, asVoidType, asWildcard, compareTo, deepClone, getCorrectFields, getCorrectFields, getCorrectMethods, getCorrectMethods, getFieldList, getFieldList, getFieldList, getFieldList, getMethodList, getMethodList, getMethodList, getMethodList, getSourceInfo, isArrayType, isFunctionType, isGenericType, isInferenceVariable, isIntersectionType, isNullType, isNumericWithSIUnitType, isObjectType, isObscureType, isRegExType, isSIUnitType, isTupleType, isTypeVariable, isUnionType, isValidType, isVoidType, isWildcard, print, printAsJson, printFullName, replaceTypeVariables, transformFieldList, transformMethodList
-
Field Details
-
typeSymbol
-
primitiveTypes
Deprecated, for removal: This API element is subject to removal in a future version.cannot assume fixed set for all languagesList of potential constants (on purpose not implemented as enum) -
unboxMap
Deprecated, for removal: This API element is subject to removal in a future version.Map for unboxing const types (e.g. "java.lang.Boolean" -> "boolean") -
boxMap
Deprecated, for removal: This API element is subject to removal in a future version.Map for boxing const types (e.g. "boolean" -> "java.lang.Boolean") Results are fully qualified.
-
-
Constructor Details
-
SymTypePrimitive
-
-
Method Details
-
hasTypeInfo
public boolean hasTypeInfo()Description copied from class:SymTypeExpressionWhether we can call getTypeInfo- Overrides:
hasTypeInfoin classSymTypeExpression
-
getTypeInfo
Description copied from class:SymTypeExpressionReturns an TypeSymbol representing the type Only to be called according toSymTypeExpression.hasTypeInfo()As most SymTypeExpressions do not have a TypeSymbol (this is legacy), this method will log a warning and is expected to be overridden, if a TypeSymbol exists.
- Overrides:
getTypeInfoin classSymTypeExpression
-
getPrimitiveName
-
getBoxedPrimitiveName
Deprecated, for removal: This API element is subject to removal in a future version. -
getBaseOfBoxedName
Deprecated, for removal: This API element is subject to removal in a future version.only used in 1 test ONCE... in our main projects -
setPrimitiveName
Deprecated, for removal: This API element is subject to removal in a future version.only used in tests in our main projects -
unbox
Deprecated, for removal: This API element is subject to removal in a future version.use SymTypeRelationsunboxing const types (e.g."java.lang.Boolean" -> "boolean"). otherwise return is unchanged- Parameters:
boxedName-- Returns:
-
box
Deprecated, for removal: This API element is subject to removal in a future version.use SymTypeRelationsBoxing const types (e.g."boolean" -> "java.lang.Boolean") Results are fully qualified. Otherwise return is unchanged- Parameters:
unboxedName-- Returns:
-
isIntegralType
public boolean isIntegralType()Checks whether it is an integer type (incl. byte, long, char)- Returns:
- true if the given type is an integral type
-
isNumericType
public boolean isNumericType()Checks whether it is a numeric type (incl. byte, long, char, float)- Returns:
- true if the given type is a numeric type
-
isPrimitive
public boolean isPrimitive()Description copied from class:SymTypeExpressionAm I primitive? (such as "int") (default: no)- Overrides:
isPrimitivein classSymTypeExpression
-
asPrimitive
- Overrides:
asPrimitivein classSymTypeExpression
-
deepEquals
- Specified by:
deepEqualsin classSymTypeExpression
-
accept
- Overrides:
acceptin classSymTypeExpression
-