Package de.monticore.types.check
Class SymTypeObscure
- java.lang.Object
-
- de.monticore.types.check.SymTypeExpression
-
- de.monticore.types.check.SymTypeObscure
-
public class SymTypeObscure extends SymTypeExpression
-
-
Field Summary
-
Fields inherited from class de.monticore.types.check.SymTypeExpression
functionList, LOG_NAME, sourceInfo, typeSymbol
-
-
Constructor Summary
Constructors Constructor Description SymTypeObscure()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(ISymTypeVisitor visitor)SymTypeObscureasObscureType()SymTypeExpressiondeepClone()booleandeepEquals(SymTypeExpression sym)protected java.util.List<VariableSymbol>getCorrectFields(java.lang.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 java.util.List<FunctionSymbol>getCorrectMethods(java.lang.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 methodsjava.util.List<VariableSymbol>getFieldList(java.lang.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 instancejava.util.List<VariableSymbol>getFieldList(java.lang.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 namejava.util.List<FunctionSymbol>getMethodList(java.lang.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 typebooleanisObscureType()Can I not have a type derived from (e.g.booleanisValidType()Am 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, 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
-
-
-
-
Method Detail
-
deepClone
public SymTypeExpression deepClone()
- Overrides:
deepClonein classSymTypeExpression
-
deepEquals
public boolean deepEquals(SymTypeExpression sym)
- 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
public SymTypeObscure asObscureType()
- Overrides:
asObscureTypein classSymTypeExpression
-
getMethodList
public java.util.List<FunctionSymbol> getMethodList(java.lang.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 java.util.List<FunctionSymbol> getCorrectMethods(java.lang.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 java.util.List<VariableSymbol> getFieldList(java.lang.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 java.util.List<VariableSymbol> getFieldList(java.lang.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 java.util.List<VariableSymbol> getCorrectFields(java.lang.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
public void accept(ISymTypeVisitor visitor)
- Overrides:
acceptin classSymTypeExpression
-
-