Class SymTypeFreeVariableReplaceVisitor
java.lang.Object
de.monticore.types3.util.SymTypeDeepCloneVisitor
de.monticore.types3.generics.util.SymTypeFreeVariableReplaceVisitor
- All Implemented Interfaces:
ISymTypeVisitor
Replaces type variables, that are free in the given enclosing scope,
with inference variables.
Returns both, the new type,
and a map from the replaced variables to the replacement.
Usage:
calculate(symType, enclosingScope)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classjust a pair -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IBasicSymbolsScopeprotected Map<SymTypeVariable, SymTypeInferenceVariable> Map for replacing Type VariablesFields inherited from class de.monticore.types3.util.SymTypeDeepCloneVisitor
transformedSymTypes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculate(SymTypeExpression symType, IBasicSymbolsScope enclosingScope) protected IBasicSymbolsScopeprotected Map<SymTypeVariable, SymTypeInferenceVariable> voidsetEnclosingScope(IBasicSymbolsScope enclosingScope) voidsetReplaceMap(Map<SymTypeVariable, SymTypeInferenceVariable> replaceMap) voidvisit(SymTypeVariable typeVar) Methods inherited from class de.monticore.types3.util.SymTypeDeepCloneVisitor
applyToCollection, applyToCollection, calculate, getTransformedSymType, getTransformedSymTypes, popTransformedSubSymType, pushTransformedSymType, reset, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
-
Field Details
-
replaceMap
Map for replacing Type Variables -
enclosingScope
-
-
Constructor Details
-
SymTypeFreeVariableReplaceVisitor
public SymTypeFreeVariableReplaceVisitor()
-
-
Method Details
-
getReplaceMap
-
setReplaceMap
-
getEnclosingScope
-
setEnclosingScope
-
visit
- Specified by:
visitin interfaceISymTypeVisitor- Overrides:
visitin classSymTypeDeepCloneVisitor
-
calculate
public SymTypeFreeVariableReplaceVisitor.Result calculate(SymTypeExpression symType, IBasicSymbolsScope enclosingScope)
-