blob: 70ec3dba6d0e20dc9049ac177e7c96525d35f30a [file] [log] [blame]
/*
* Copyright (c) 2005, 2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM - initial API and implementation
*
* $Id: TemplateParameterSubstitution.java,v 1.9 2006/12/14 15:49:28 khussey Exp $
*/
package org.eclipse.uml2.uml;
import java.util.Map;
import org.eclipse.emf.common.util.DiagnosticChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Template Parameter Substitution</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* A template parameter substitution relates the actual parameter(s) to a formal template parameter as part of a template binding.
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.uml2.uml.TemplateParameterSubstitution#getFormal <em>Formal</em>}</li>
* <li>{@link org.eclipse.uml2.uml.TemplateParameterSubstitution#getActuals <em>Actual</em>}</li>
* <li>{@link org.eclipse.uml2.uml.TemplateParameterSubstitution#getOwnedActuals <em>Owned Actual</em>}</li>
* <li>{@link org.eclipse.uml2.uml.TemplateParameterSubstitution#getTemplateBinding <em>Template Binding</em>}</li>
* </ul>
* </p>
*
* @see org.eclipse.uml2.uml.UMLPackage#getTemplateParameterSubstitution()
* @model
* @generated
*/
public interface TemplateParameterSubstitution
extends Element {
/**
* Returns the value of the '<em><b>Formal</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The formal template parameter that is associated with this substitution.
* <!-- end-model-doc -->
* @return the value of the '<em>Formal</em>' reference.
* @see #setFormal(TemplateParameter)
* @see org.eclipse.uml2.uml.UMLPackage#getTemplateParameterSubstitution_Formal()
* @model required="true" ordered="false"
* @generated
*/
TemplateParameter getFormal();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.TemplateParameterSubstitution#getFormal <em>Formal</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Formal</em>' reference.
* @see #getFormal()
* @generated
*/
void setFormal(TemplateParameter value);
/**
* Returns the value of the '<em><b>Actual</b></em>' reference list.
* The list contents are of type {@link org.eclipse.uml2.uml.ParameterableElement}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The elements that are the actual parameters for this substitution.
* <!-- end-model-doc -->
* @return the value of the '<em>Actual</em>' reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getTemplateParameterSubstitution_Actual()
* @model type="org.eclipse.uml2.uml.ParameterableElement" required="true" ordered="false"
* @generated
*/
EList<ParameterableElement> getActuals();
/**
* Returns the value of the '<em><b>Owned Actual</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.uml2.uml.ParameterableElement}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The actual parameters that are owned by this substitution.
* <!-- end-model-doc -->
* @return the value of the '<em>Owned Actual</em>' containment reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getTemplateParameterSubstitution_OwnedActual()
* @model type="org.eclipse.uml2.uml.ParameterableElement" containment="true" resolveProxies="true" ordered="false"
* @generated
*/
EList<ParameterableElement> getOwnedActuals();
/**
* Creates a new {@link org.eclipse.uml2.uml.ParameterableElement} and appends it to the '<em><b>Owned Actual</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param eClass The Ecore class of the {@link org.eclipse.uml2.uml.ParameterableElement} to create.
* @return The new {@link org.eclipse.uml2.uml.ParameterableElement}.
* @see #getOwnedActuals()
* @generated
*/
ParameterableElement createOwnedActual(EClass eClass);
/**
* Returns the value of the '<em><b>Template Binding</b></em>' container reference.
* It is bidirectional and its opposite is '{@link org.eclipse.uml2.uml.TemplateBinding#getParameterSubstitutions <em>Parameter Substitution</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The optional bindings from this element to templates.
* <!-- end-model-doc -->
* @return the value of the '<em>Template Binding</em>' container reference.
* @see #setTemplateBinding(TemplateBinding)
* @see org.eclipse.uml2.uml.UMLPackage#getTemplateParameterSubstitution_TemplateBinding()
* @see org.eclipse.uml2.uml.TemplateBinding#getParameterSubstitutions
* @model opposite="parameterSubstitution" required="true" ordered="false"
* @generated
*/
TemplateBinding getTemplateBinding();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.TemplateParameterSubstitution#getTemplateBinding <em>Template Binding</em>}' container reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Template Binding</em>' container reference.
* @see #getTemplateBinding()
* @generated
*/
void setTemplateBinding(TemplateBinding value);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The actual parameter must be compatible with the formal template parameter, e.g. the actual parameter for a class template parameter must be a class.
* actual->forAll(a | a.isCompatibleWith(formal.parameteredElement))
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateMustBeCompatible(DiagnosticChain diagnostics,
Map<Object, Object> context);
} // TemplateParameterSubstitution