Class SymTypeObscure

java.lang.Object
de.monticore.types.check.SymTypeExpression
de.monticore.types.check.SymTypeObscure
All Implemented Interfaces:
Comparable<SymTypeExpression>

public class SymTypeObscure extends SymTypeExpression
  • Constructor Details

    • SymTypeObscure

      public SymTypeObscure()
  • Method Details

    • deepClone

      public SymTypeExpression deepClone()
      Overrides:
      deepClone in class SymTypeExpression
    • deepEquals

      public boolean deepEquals(SymTypeExpression sym)
      Specified by:
      deepEquals in class SymTypeExpression
    • isValidType

      public boolean isValidType()
      Description copied from class: SymTypeExpression
      Am I a not valid type? e.g. unknown type, not all type variables set, pseudo types like typeVariables
      Overrides:
      isValidType in class SymTypeExpression
    • isObscureType

      public boolean isObscureType()
      Description copied from class: SymTypeExpression
      Can I not have a type derived from (e.g. "1 - student")?
      Overrides:
      isObscureType in class SymTypeExpression
    • asObscureType

      public SymTypeObscure asObscureType()
      Overrides:
      asObscureType in class SymTypeExpression
    • getMethodList

      public List<FunctionSymbol> getMethodList(String methodname, boolean abstractTc, de.monticore.symboltable.modifiers.AccessModifier modifier)
      Description copied from class: SymTypeExpression
      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 type
      Overrides:
      getMethodList in class SymTypeExpression
    • getCorrectMethods

      protected List<FunctionSymbol> getCorrectMethods(String methodName, boolean outerIsType, boolean abstractTc, de.monticore.symboltable.modifiers.AccessModifier modifier)
      Description copied from class: SymTypeExpression
      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 methods
      Overrides:
      getCorrectMethods in class SymTypeExpression
      Parameters:
      methodName - name of the method we search for
      outerIsType - true if last result of type check was type, false if it was an instance
      abstractTc - 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: SymTypeExpression
      returns the list of fields the SymTypeExpression can access and filters these for a field with specific name
      Overrides:
      getFieldList in class SymTypeExpression
    • getFieldList

      public List<VariableSymbol> getFieldList(String fieldName, boolean outerIsType, boolean abstractTc, de.monticore.symboltable.modifiers.AccessModifier modifier)
      Description copied from class: SymTypeExpression
      returns the correct fields in both cases: 1) the last result was a type, 2) the last result was an instance
      Overrides:
      getFieldList in class SymTypeExpression
      Parameters:
      fieldName - name of the field we search for
      outerIsType - 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: SymTypeExpression
      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 fields
      Overrides:
      getCorrectFields in class SymTypeExpression
      Parameters:
      fieldName - name of the field we search for
      outerIsType - 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:
      accept in class SymTypeExpression