public class TemplateParameterSubstitutionVisitor extends AbstractExtendingVisitor<Object,Map<Integer,Type>> implements TemplateParameterSubstitutions
The visitor should be constructed with a MetamodelManager in case any synthetic types need contructing, and the identity of the self type incase one of the substitutions uses OclSelf.
TemplateParameterSubstitutions.EmptyEMPTY| Constructor and Description |
|---|
TemplateParameterSubstitutionVisitor(EnvironmentFactoryInternal environmentFactory,
Type selfType,
Type selfTypeValue) |
| Modifier and Type | Method and Description |
|---|---|
static TemplateParameterSubstitutions |
createBindings(EnvironmentFactoryInternal environmentFactory,
Type formalType,
Type actualType) |
static TemplateParameterSubstitutions |
createBindings(EnvironmentFactoryInternal environmentFactory,
Type sourceType,
Type sourceTypeValue,
Operation candidateOperation) |
Type |
get(TemplateParameter templateParameter)
Return the highest common actual type of the formal templateParameter, returning null if unknown.
|
boolean |
isEmpty()
Return true if there are no formal TemplateParameters with actual values.
|
void |
put(int templateParameterIndex,
Type actualType) |
Type |
put(TemplateParameter formalTemplateParameter,
Type actualType)
Install actualType as the resolutions of formalTemplateParameter, returning the highest common type of actualType
and any pre-existing resolution.
|
Type |
specializeType(Type type) |
static Type |
specializeType(Type type,
CallExp callExp,
EnvironmentFactoryInternal environmentFactory,
Type selfType,
Type selfTypeValue)
Return the specialized form of type analyzing expr to determine the formal to actual parameter mappings under the
supervision of a metamodelManager and using selfType as the value of OclSelf.
|
String |
toString() |
Object |
visitClass(Class object) |
Object |
visitCollectionType(CollectionType object) |
String |
visiting(Visitable visitable)
Return the result of visiting a visitable for which no more specific pivot type method
is available.
|
Object |
visitIterateExp(IterateExp object) |
Object |
visitIteratorExp(IteratorExp object) |
Object |
visitLambdaType(LambdaType object) |
Object |
visitMapType(MapType object) |
Object |
visitOperationCallExp(OperationCallExp object) |
Object |
visitOppositePropertyCallExp(OppositePropertyCallExp object) |
Object |
visitParameter(Parameter object) |
Object |
visitPrimitiveType(PrimitiveType object) |
Object |
visitPropertyCallExp(PropertyCallExp object) |
Object |
visitSelfType(SelfType object) |
Object |
visitTemplateParameter(TemplateParameter object) |
Object |
visitTupleType(TupleType object) |
Object |
visitTypedElement(TypedElement object) |
visitAnnotation, visitAnyType, visitAssociationClass, visitAssociationClassCallExp, visitBagType, visitBehavior, visitBooleanLiteralExp, visitCallExp, visitCallOperationAction, visitCollectionItem, visitCollectionLiteralExp, visitCollectionLiteralPart, visitCollectionRange, visitComment, visitCompleteClass, visitCompleteEnvironment, visitCompleteModel, visitCompletePackage, visitConnectionPointReference, visitConstraint, visitDataType, visitDetail, visitDynamicBehavior, visitDynamicElement, visitDynamicProperty, visitDynamicType, visitDynamicValueSpecification, visitElement, visitElementExtension, visitEnumeration, visitEnumerationLiteral, visitEnumLiteralExp, visitExpressionInOCL, visitFeature, visitFeatureCallExp, visitFinalState, visitIfExp, visitImport, visitInstanceSpecification, visitIntegerLiteralExp, visitInvalidLiteralExp, visitInvalidType, visitIteration, visitIteratorVariable, visitLanguageExpression, visitLetExp, visitLetVariable, visitLibrary, visitLiteralExp, visitLoopExp, visitMapLiteralExp, visitMapLiteralPart, visitMessageExp, visitMessageType, visitModel, visitNamedElement, visitNamespace, visitNavigationCallExp, visitNullLiteralExp, visitNumericLiteralExp, visitOCLExpression, visitOperation, visitOrderedSetType, visitOrphanCompletePackage, visitPackage, visitParameterVariable, visitPrecedence, visitPrimitiveCompletePackage, visitPrimitiveLiteralExp, visitProfile, visitProfileApplication, visitProperty, visitPseudostate, visitRealLiteralExp, visitRegion, visitResultVariable, visitSendSignalAction, visitSequenceType, visitSetType, visitShadowExp, visitShadowPart, visitSignal, visitSlot, visitStandardLibrary, visitState, visitStateExp, visitStateMachine, visitStereotype, visitStereotypeExtender, visitStringLiteralExp, visitTemplateableElement, visitTemplateBinding, visitTemplateParameterSubstitution, visitTemplateSignature, visitTransition, visitTrigger, visitTupleLiteralExp, visitTupleLiteralPart, visitType, visitTypeExp, visitUnlimitedNaturalLiteralExp, visitUnspecifiedValueExp, visitValueSpecification, visitVariable, visitVariableDeclaration, visitVariableExp, visitVertex, visitVoidType, visitWildcardTypegetAdapter, safeVisit, visitequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAdapterpublic TemplateParameterSubstitutionVisitor(EnvironmentFactoryInternal environmentFactory, Type selfType, Type selfTypeValue)
public static TemplateParameterSubstitutions createBindings(EnvironmentFactoryInternal environmentFactory, Type formalType, Type actualType)
public static TemplateParameterSubstitutions createBindings(EnvironmentFactoryInternal environmentFactory, Type sourceType, Type sourceTypeValue, Operation candidateOperation)
public static Type specializeType(Type type, CallExp callExp, EnvironmentFactoryInternal environmentFactory, Type selfType, Type selfTypeValue)
public Type get(TemplateParameter templateParameter)
TemplateParameterSubstitutionsget in interface TemplateParameterSubstitutionspublic boolean isEmpty()
TemplateParameterSubstitutionsisEmpty in interface TemplateParameterSubstitutionspublic void put(int templateParameterIndex,
Type actualType)
public Type put(TemplateParameter formalTemplateParameter, Type actualType)
TemplateParameterSubstitutionsput in interface TemplateParameterSubstitutionspublic String visiting(Visitable visitable)
Visitorpublic Object visitClass(Class object)
visitClass in interface Visitor<Object>visitClass in class AbstractExtendingVisitor<Object,Map<Integer,Type>>public Object visitCollectionType(CollectionType object)
visitCollectionType in interface Visitor<Object>visitCollectionType in class AbstractExtendingVisitor<Object,Map<Integer,Type>>public Object visitIterateExp(IterateExp object)
visitIterateExp in interface Visitor<Object>visitIterateExp in class AbstractExtendingVisitor<Object,Map<Integer,Type>>public Object visitIteratorExp(IteratorExp object)
visitIteratorExp in interface Visitor<Object>visitIteratorExp in class AbstractExtendingVisitor<Object,Map<Integer,Type>>public Object visitLambdaType(LambdaType object)
visitLambdaType in interface Visitor<Object>visitLambdaType in class AbstractExtendingVisitor<Object,Map<Integer,Type>>public Object visitMapType(MapType object)
visitMapType in interface Visitor<Object>visitMapType in class AbstractExtendingVisitor<Object,Map<Integer,Type>>public Object visitOperationCallExp(OperationCallExp object)
visitOperationCallExp in interface Visitor<Object>visitOperationCallExp in class AbstractExtendingVisitor<Object,Map<Integer,Type>>public Object visitOppositePropertyCallExp(OppositePropertyCallExp object)
visitOppositePropertyCallExp in interface Visitor<Object>visitOppositePropertyCallExp in class AbstractExtendingVisitor<Object,Map<Integer,Type>>public Object visitParameter(Parameter object)
visitParameter in interface Visitor<Object>visitParameter in class AbstractExtendingVisitor<Object,Map<Integer,Type>>public Object visitPrimitiveType(PrimitiveType object)
visitPrimitiveType in interface Visitor<Object>visitPrimitiveType in class AbstractExtendingVisitor<Object,Map<Integer,Type>>public Object visitPropertyCallExp(PropertyCallExp object)
visitPropertyCallExp in interface Visitor<Object>visitPropertyCallExp in class AbstractExtendingVisitor<Object,Map<Integer,Type>>public Object visitSelfType(SelfType object)
visitSelfType in interface Visitor<Object>visitSelfType in class AbstractExtendingVisitor<Object,Map<Integer,Type>>public Object visitTemplateParameter(TemplateParameter object)
visitTemplateParameter in interface Visitor<Object>visitTemplateParameter in class AbstractExtendingVisitor<Object,Map<Integer,Type>>public Object visitTupleType(TupleType object)
visitTupleType in interface Visitor<Object>visitTupleType in class AbstractExtendingVisitor<Object,Map<Integer,Type>>public Object visitTypedElement(TypedElement object)
visitTypedElement in interface Visitor<Object>visitTypedElement in class AbstractExtendingVisitor<Object,Map<Integer,Type>>Copyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.