Package de.monticore.types3.util
Class NominalSuperTypeCalculator
- java.lang.Object
-
- de.monticore.types3.util.NominalSuperTypeCalculator
-
public class NominalSuperTypeCalculator extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringLOG_NAME
-
Constructor Summary
Constructors Constructor Description NominalSuperTypeCalculator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<SymTypeExpression>getNominalSuperTypes(SymTypeExpression thisType)supertypes, but modified according to type parameters.protected java.util.List<SymTypeExpression>getUnmodifiedSuperTypesList(SymTypeExpression thisType)protected booleanisSupported(SymTypeExpression type)
-
-
-
Field Detail
-
LOG_NAME
protected static final java.lang.String LOG_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getNominalSuperTypes
public java.util.List<SymTypeExpression> getNominalSuperTypes(SymTypeExpression thisType)
supertypes, but modified according to type parameters. Practically, this is meant to be used with object types including generics. This returns the list of nominal supertypes, e.g., in Java using extends / implements e.g.Collection<Integer>is an explicit super type ofList<Integer>,List<? super Integer>is a super type ofList<Integer>, but not an explicitly defined one. We consider explicitly defined super types to be the ones given by the list of super types in the type symbol."nominal" supertypes in that the superTypes are explicitly "named"/listed, it is NOT required that they have a name themselves; This does not quite but mostly fit the following definition: Pierce, Types and Programming Languages (chapter 19.3): """ Type systems like Java's, in which names are significant and subtyping is explicitly declared, are called nominal. Type systems [...] in which names are inessential and subtyping is defined directly on the structures of types are called structural. """
-
getUnmodifiedSuperTypesList
protected java.util.List<SymTypeExpression> getUnmodifiedSuperTypesList(SymTypeExpression thisType)
-
isSupported
protected boolean isSupported(SymTypeExpression type)
-
-