Package de.monticore.types.check
Class SymTypeInferenceVariable
java.lang.Object
de.monticore.types.check.SymTypeExpression
de.monticore.types.check.SymTypeInferenceVariable
- All Implemented Interfaces:
Comparable<SymTypeExpression>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThis holds a number of the free type variable, which acts as an identifier.protected Stringa short string, e.g., "FV", that is output with the id while printingprotected SymTypeExpressionprotected static AtomicIntegerprotected SymTypeExpressionFields inherited from class de.monticore.types.check.SymTypeExpression
functionList, LOG_NAME, sourceInfo, typeSymbol -
Constructor Summary
ConstructorsConstructorDescriptionSymTypeInferenceVariable(int id, String idStr, SymTypeExpression lowerBound, SymTypeExpression upperBound) INTERNAL, DO NOT USE: used for deepcloningSymTypeInferenceVariable(String idStr, SymTypeExpression lowerBound, SymTypeExpression upperBound) -
Method Summary
Modifier and TypeMethodDescriptionintaccessible for printing, sorting, etc.accessible for printing usually, you do not need/want this.voidaccept(ISymTypeVisitor visitor) booleanbooleandenotesSameVar(SymTypeExpression other) Similar to deepEquals, but only checks whether the variables are supposed to be the same variable.protected static intbooleanAm I a free type variable?booleanAm I primitive? (such as "int") (default: no)Methods inherited from class de.monticore.types.check.SymTypeExpression
_internal_setSourceInfo, asArrayType, asFunctionType, asGenericType, asIntersectionType, asNullType, asNumericWithSIUnitType, asObjectType, asObscureType, asPrimitive, asRegExType, asSIUnitType, asTupleType, asTypeVariable, asUnionType, asVoidType, asWildcard, compareTo, getCorrectFields, getCorrectFields, getCorrectMethods, getCorrectMethods, getFieldList, getFieldList, getFieldList, getFieldList, getMethodList, getMethodList, getMethodList, getMethodList, getSourceInfo, getTypeInfo, hasTypeInfo, isArrayType, isFunctionType, isGenericType, isIntersectionType, isNullType, isNumericWithSIUnitType, isObjectType, isObscureType, isRegExType, isSIUnitType, isTupleType, isTypeVariable, isUnionType, isValidType, isVoidType, isWildcard, print, printAsJson, printFullName, replaceTypeVariables, transformFieldList, transformMethodList
-
Field Details
-
id
protected int idThis holds a number of the free type variable, which acts as an identifier. The Only guarantee is that the ids are unique. Never test against them. -
idStr
a short string, e.g., "FV", that is output with the id while printing -
lowerBound
-
upperBound
-
typeInfIDCounter
-
-
Constructor Details
-
SymTypeInferenceVariable
public SymTypeInferenceVariable(String idStr, SymTypeExpression lowerBound, SymTypeExpression upperBound) -
SymTypeInferenceVariable
public SymTypeInferenceVariable(int id, String idStr, SymTypeExpression lowerBound, SymTypeExpression upperBound) INTERNAL, DO NOT USE: used for deepcloning
-
-
Method Details
-
getLowerBound
-
getUpperBound
-
_internal_getID
public int _internal_getID()accessible for printing, sorting, etc. usually, you do not need/want this. -
_internal_getIDStr
accessible for printing usually, you do not need/want this. -
isPrimitive
public boolean isPrimitive()Description copied from class:SymTypeExpressionAm I primitive? (such as "int") (default: no)- Overrides:
isPrimitivein classSymTypeExpression
-
isInferenceVariable
public boolean isInferenceVariable()Description copied from class:SymTypeExpressionAm I a free type variable?- Overrides:
isInferenceVariablein classSymTypeExpression
-
asInferenceVariable
- Overrides:
asInferenceVariablein classSymTypeExpression
-
deepClone
- Overrides:
deepClonein classSymTypeExpression
-
denotesSameVar
Similar to deepEquals, but only checks whether the variables are supposed to be the same variable. E.g., bounds are ignored -
deepEquals
- Specified by:
deepEqualsin classSymTypeExpression
-
accept
- Overrides:
acceptin classSymTypeExpression
-
getUniqueID
protected static int getUniqueID()
-