Package de.monticore.types.check
Class CompKindOfComponentType
java.lang.Object
de.monticore.types.check.CompKindExpression
de.monticore.types.check.CompKindOfComponentType
Represents a component expression that is solely defined by the component symbol.
-
Field Summary
Fields inherited from class de.monticore.types.check.CompKindExpression
arguments, component, parameterBindings, sourceNode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionLogs an error if this is not a component typedeepClone(@NonNull ComponentTypeSymbol component) booleandeepEquals(@NonNull CompKindExpression component) getTypeOfParameter(@NonNull String name) Returns the SymTypeExpression of the type of the parameter specified byparameterName.getTypeOfPort(@NonNull String portName) Returns the SymTypeExpression of the type of the port specified byportName.booleanAm I simple component type? (such as "C") (default: no)Methods inherited from class de.monticore.types.check.CompKindExpression
addArgument, addArgument, asGenericComponentType, bindParams, deepClone, getArguments, getParamBindingFor, getParamBindings, getParamBindingsAsList, getSourceNode, getTypeInfo, isGenericComponentType, setSourceNode, setSourceNodeAbsent
-
Constructor Details
-
CompKindOfComponentType
-
-
Method Details
-
printName
- Specified by:
printNamein classCompKindExpression
-
printFullName
- Specified by:
printFullNamein classCompKindExpression
-
isComponentType
public boolean isComponentType()Description copied from class:CompKindExpressionAm I simple component type? (such as "C") (default: no)- Overrides:
isComponentTypein classCompKindExpression
-
asComponentType
Description copied from class:CompKindExpressionLogs an error if this is not a component type- Overrides:
asComponentTypein classCompKindExpression- Returns:
- this expression as a component type
-
getSuperComponents
- Specified by:
getSuperComponentsin classCompKindExpression- Returns:
- The
CompKindExpressionthat represents this component's super components. E.g., givenComp<T> extends Parent<List<T>>, the returned list for component expressionComp<Person>contains a single entry representingParent<List<Person>>. The List is empty if the component has no super components.
-
getTypeOfPort
Description copied from class:CompKindExpressionReturns the SymTypeExpression of the type of the port specified byportName. 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 isComp<Person>and Comp is defined byComp<T>, having a port of typeT. Then, as the type argument forTisPerson, the SymTypeExpression returned by this method will bePersonfor that port.- Specified by:
getTypeOfPortin classCompKindExpression- Parameters:
portName- The name of the port for whom the type is requested.- Returns:
- The
SymTypeExpressionsof the port's type enclosed in anOptional. An emptyOptionalif the component has no such port.
-
getTypeOfParameter
Description copied from class:CompKindExpressionReturns the SymTypeExpression of the type of the parameter specified byparameterName. 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 isComp<Person>and Comp is defined byComp<T>, having a parameter of typeT. Then, as the type argument forTisPerson, the SymTypeExpression returned by this method will bePersonfor that parameter.- Specified by:
getTypeOfParameterin classCompKindExpression- Parameters:
name- The name of the parameter for whom the type is requested.- Returns:
- The
SymTypeExpressionsof the parameter's type enclosed in anOptional. An emptyOptionalif the component has no such parameter.
-
getParameterTypes
- Specified by:
getParameterTypesin classCompKindExpression
-
deepClone
- Specified by:
deepClonein classCompKindExpression
-
deepEquals
- Specified by:
deepEqualsin classCompKindExpression
-