Class CompKindOfComponentType

java.lang.Object
de.monticore.types.check.CompKindExpression
de.monticore.types.check.CompKindOfComponentType

public class CompKindOfComponentType extends CompKindExpression
Represents a component expression that is solely defined by the component symbol.
  • Constructor Details

    • CompKindOfComponentType

      public CompKindOfComponentType(@NonNull ComponentTypeSymbol component)
  • Method Details

    • printName

      public String printName()
      Specified by:
      printName in class CompKindExpression
    • printFullName

      public String printFullName()
      Specified by:
      printFullName in class CompKindExpression
    • isComponentType

      public boolean isComponentType()
      Description copied from class: CompKindExpression
      Am I simple component type? (such as "C") (default: no)
      Overrides:
      isComponentType in class CompKindExpression
    • asComponentType

      public CompKindOfComponentType asComponentType()
      Description copied from class: CompKindExpression
      Logs an error if this is not a component type
      Overrides:
      asComponentType in class CompKindExpression
      Returns:
      this expression as a component type
    • getSuperComponents

      public List<CompKindExpression> getSuperComponents()
      Specified by:
      getSuperComponents in class CompKindExpression
      Returns:
      The CompKindExpression that represents this component's super components. E.g., given Comp<T> extends Parent<List<T>>, the returned list for component expression Comp<Person> contains a single entry representing Parent<List<Person>>. The List is empty if the component has no super components.
    • getTypeOfPort

      public Optional<SymTypeExpression> getTypeOfPort(@NonNull String portName)
      Description copied from class: CompKindExpression
      Returns the SymTypeExpression of the type of the port specified by portName. If the port's type depends on type parameters which are assigned by this CompTypeExpression, they are resolved in the returned SymTypeExpression. E.g., let assume this component's type expression is Comp<Person> and Comp is defined by Comp<T>, having a port of type T. Then, as the type argument for T is Person, the SymTypeExpression returned by this method will be Person for that port.
      Specified by:
      getTypeOfPort in class CompKindExpression
      Parameters:
      portName - The name of the port for whom the type is requested.
      Returns:
      The SymTypeExpressions of the port's type enclosed in an Optional. An empty Optional if the component has no such port.
    • getTypeOfParameter

      public Optional<SymTypeExpression> getTypeOfParameter(@NonNull String name)
      Description copied from class: CompKindExpression
      Returns the SymTypeExpression of the type of the parameter specified by parameterName. If the parameter's type depends on type parameters which are assigned by this CompTypeExpression, they are resolved in the returned SymTypeExpression. E.g., let assume this component's type expression is Comp<Person> and Comp is defined by Comp<T>, having a parameter of type T. Then, as the type argument for T is Person, the SymTypeExpression returned by this method will be Person for that parameter.
      Specified by:
      getTypeOfParameter in class CompKindExpression
      Parameters:
      name - The name of the parameter for whom the type is requested.
      Returns:
      The SymTypeExpressions of the parameter's type enclosed in an Optional. An empty Optional if the component has no such parameter.
    • getParameterTypes

      public List<Optional<SymTypeExpression>> getParameterTypes()
      Specified by:
      getParameterTypes in class CompKindExpression
    • deepClone

      public CompKindOfComponentType deepClone(@NonNull ComponentTypeSymbol component)
      Specified by:
      deepClone in class CompKindExpression
    • deepEquals

      public boolean deepEquals(@NonNull CompKindExpression component)
      Specified by:
      deepEquals in class CompKindExpression