blob: 05c7aa11ff7b3d9100f4d71b9185e8d7d3de5f45 [file] [log] [blame]
/*
* Copyright (c) 2005 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: Extension.java,v 1.2 2005/11/16 19:03:05 khussey Exp $
*/
package org.eclipse.uml2.uml;
import java.util.Map;
import org.eclipse.emf.common.util.DiagnosticChain;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Extension</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* Extension is a kind of Association. One end of the Extension is an ordinary Property and the other end is an ExtensionEnd. The former ties the Extension to a Class, while the latter ties the Extension to a Stereotype that extends the Class.
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.uml2.uml.Extension#isRequired <em>Is Required</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Extension#getMetaclass <em>Metaclass</em>}</li>
* </ul>
* </p>
*
* @see org.eclipse.uml2.uml.UMLPackage#getExtension()
* @model
* @generated
*/
public interface Extension
extends Association {
/**
* Returns the value of the '<em><b>Is Required</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Indicates whether an instance of the extending stereotype must be created when an instance of the extended class is created. The attribute value is derived from the multiplicity of the Property referenced by Extension::ownedEnd; a multiplicity of 1 means that isRequired is true, but otherwise it is false. Since the default multiplicity of an ExtensionEnd is 0..1, the default value of isRequired is false.
* <!-- end-model-doc -->
* @return the value of the '<em>Is Required</em>' attribute.
* @see org.eclipse.uml2.uml.UMLPackage#getExtension_IsRequired()
* @model required="true" transient="true" changeable="false" volatile="true" derived="true" ordered="false"
* @generated
*/
boolean isRequired();
/**
* Returns the value of the '<em><b>Metaclass</b></em>' reference.
* It is bidirectional and its opposite is '{@link org.eclipse.uml2.uml.Class#getExtensions <em>Extension</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* References the Class that is extended through an Extension. The property is derived from the type of the memberEnd that is not the ownedEnd.
* <!-- end-model-doc -->
* @return the value of the '<em>Metaclass</em>' reference.
* @see org.eclipse.uml2.uml.UMLPackage#getExtension_Metaclass()
* @see org.eclipse.uml2.uml.Class#getExtensions
* @model opposite="extension" required="true" transient="true" changeable="false" volatile="true" derived="true" ordered="false"
* @generated
*/
org.eclipse.uml2.uml.Class getMetaclass();
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The non-owned end of an Extension is typed by a Class.
* metaclassEnd()->notEmpty() and metaclass()->oclIsKindOf(Class)
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateNonOwnedEnd(DiagnosticChain diagnostics, Map context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* An Extension is binary, i.e., it has only two memberEnds.
* memberEnd->size() = 2
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateIsBinary(DiagnosticChain diagnostics, Map context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The query metaclassEnd() returns the Property that is typed by a metaclass (as opposed to a stereotype).
* result = memberEnd->reject(ownedEnd)
* <!-- end-model-doc -->
* @model required="true" ordered="false"
* annotation="http://www.eclipse.org/emf/2002/Ecore constraints='spec'"
* @generated
*/
Property metaclassEnd();
} // Extension