Package de.monticore.types.check
Class SymTypeObscure
java.lang.Object
de.monticore.types.check.SymTypeExpression
de.monticore.types.check.SymTypeObscure
- All Implemented Interfaces:
Comparable<SymTypeExpression>
-
Field Summary
Fields inherited from class de.monticore.types.check.SymTypeExpression
functionList, LOG_NAME, sourceInfo, typeSymbol -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(ISymTypeVisitor visitor) booleanprotected List<VariableSymbol> getCorrectFields(String fieldName, boolean outerIsType, boolean abstractTc, de.monticore.symboltable.modifiers.AccessModifier modifier) return the correct fields for the two situations: 1) the last calculated type in the type check was a type, then filter for non-static fields and add the static fields of this type 2) the last calculated type in the type check was an instance, then just resolve for fieldsprotected List<FunctionSymbol> getCorrectMethods(String methodName, boolean outerIsType, boolean abstractTc, de.monticore.symboltable.modifiers.AccessModifier modifier) return the correct methods for the two situations: 1) the last calculated type in the type check was a type, then filter for non-static methods and add the static methods of this type 2) the last calculated type in the type check was an instance, then just resolve for methodsgetFieldList(String fieldName, boolean outerIsType, boolean abstractTc, de.monticore.symboltable.modifiers.AccessModifier modifier) returns the correct fields in both cases: 1) the last result was a type, 2) the last result was an instancegetFieldList(String fieldName, boolean abstractTc, de.monticore.symboltable.modifiers.AccessModifier modifier) returns the list of fields the SymTypeExpression can access and filters these for a field with specific namegetMethodList(String methodname, boolean abstractTc, de.monticore.symboltable.modifiers.AccessModifier modifier) returns the list of methods the SymTypeExpression can access and filters these for a method with specific name the last calculated type in the type check was no typebooleanCan I not have a type derived from (e.g.booleanAm I a not valid type? e.g.Methods inherited from class de.monticore.types.check.SymTypeExpression
_internal_setSourceInfo, asArrayType, asFunctionType, asGenericType, asInferenceVariable, asIntersectionType, asNullType, asNumericWithSIUnitType, asObjectType, asPrimitive, asRegExType, asSIUnitType, asTupleType, asTypeVariable, asUnionType, asVoidType, asWildcard, compareTo, getCorrectFields, getCorrectMethods, getFieldList, getFieldList, getMethodList, getMethodList, getMethodList, getSourceInfo, getTypeInfo, hasTypeInfo, isArrayType, isFunctionType, isGenericType, isInferenceVariable, isIntersectionType, isNullType, isNumericWithSIUnitType, isObjectType, isPrimitive, isRegExType, isSIUnitType, isTupleType, isTypeVariable, isUnionType, isVoidType, isWildcard, print, printAsJson, printFullName, replaceTypeVariables, transformFieldList, transformMethodList
-
Constructor Details
-
SymTypeObscure
public SymTypeObscure()
-
-
Method Details
-
deepClone
- Overrides:
deepClonein classSymTypeExpression
-
deepEquals
- Specified by:
deepEqualsin classSymTypeExpression
-
isValidType
public boolean isValidType()Description copied from class:SymTypeExpressionAm I a not valid type? e.g. unknown type, not all type variables set, pseudo types like typeVariables- Overrides:
isValidTypein classSymTypeExpression
-
isObscureType
public boolean isObscureType()Description copied from class:SymTypeExpressionCan I not have a type derived from (e.g. "1 - student")?- Overrides:
isObscureTypein classSymTypeExpression
-
asObscureType
- Overrides:
asObscureTypein classSymTypeExpression
-
getMethodList
public List<FunctionSymbol> getMethodList(String methodname, boolean abstractTc, de.monticore.symboltable.modifiers.AccessModifier modifier) Description copied from class:SymTypeExpressionreturns the list of methods the SymTypeExpression can access and filters these for a method with specific name the last calculated type in the type check was no type- Overrides:
getMethodListin classSymTypeExpression
-
getCorrectMethods
protected List<FunctionSymbol> getCorrectMethods(String methodName, boolean outerIsType, boolean abstractTc, de.monticore.symboltable.modifiers.AccessModifier modifier) Description copied from class:SymTypeExpressionreturn the correct methods for the two situations: 1) the last calculated type in the type check was a type, then filter for non-static methods and add the static methods of this type 2) the last calculated type in the type check was an instance, then just resolve for methods- Overrides:
getCorrectMethodsin classSymTypeExpression- Parameters:
methodName- name of the method we search forouterIsType- true if last result of type check was type, false if it was an instanceabstractTc- true if the tc is not used for object-oriented languages- Returns:
- the correct methods for the specific case
-
getFieldList
public List<VariableSymbol> getFieldList(String fieldName, boolean abstractTc, de.monticore.symboltable.modifiers.AccessModifier modifier) Description copied from class:SymTypeExpressionreturns the list of fields the SymTypeExpression can access and filters these for a field with specific name- Overrides:
getFieldListin classSymTypeExpression
-
getFieldList
public List<VariableSymbol> getFieldList(String fieldName, boolean outerIsType, boolean abstractTc, de.monticore.symboltable.modifiers.AccessModifier modifier) Description copied from class:SymTypeExpressionreturns the correct fields in both cases: 1) the last result was a type, 2) the last result was an instance- Overrides:
getFieldListin classSymTypeExpression- Parameters:
fieldName- name of the field we search forouterIsType- true if the last result was a type, false if it was an instance- Returns:
- the correct fields for the specific case
-
getCorrectFields
protected List<VariableSymbol> getCorrectFields(String fieldName, boolean outerIsType, boolean abstractTc, de.monticore.symboltable.modifiers.AccessModifier modifier) Description copied from class:SymTypeExpressionreturn the correct fields for the two situations: 1) the last calculated type in the type check was a type, then filter for non-static fields and add the static fields of this type 2) the last calculated type in the type check was an instance, then just resolve for fields- Overrides:
getCorrectFieldsin classSymTypeExpression- Parameters:
fieldName- name of the field we search forouterIsType- true if last result of type check was type, false if it was an instance- Returns:
- the correct fields for the specific case
-
accept
- Overrides:
acceptin classSymTypeExpression
-