|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A representation of the model object 'Interface'. An interface is a kind of classifier that represents a declaration of a set of coherent public features and obligations. An interface specifies a contract; any instance of a classifier that realizes the interface must fulfill that contract. The obligations that may be associated with an interface are in the form of various kinds of constraints (such as pre- and post-conditions) or protocol specifications, which may impose ordering restrictions on interactions through the interface. Interfaces may include receptions (in addition to operations). Since an interface specifies conformance characteristics, it does not own detailed behavior specifications. Instead, interfaces may own a protocol state machine that specifies event sequences and pre/post conditions for the operations and receptions described by the interface.
The following features are supported:
UMLPackage.getInterface()
Field Summary |
Fields inherited from interface org.eclipse.uml2.uml.NamedElement |
SEPARATOR |
Method Summary | |
Classifier |
createNestedClassifier(String name,
EClass eClass)
Creates a new Classifier , with the specified 'Name', and appends it to the 'Nested Classifier' containment reference list |
Property |
createOwnedAttribute(String name,
Type type)
Creates a new Property , with the specified 'Name', and 'Type', and appends it to the 'Owned Attribute' containment reference list |
Property |
createOwnedAttribute(String name,
Type type,
EClass eClass)
Creates a new Property , with the specified 'Name', and 'Type', and appends it to the 'Owned Attribute' containment reference list |
Property |
createOwnedAttribute(String name,
Type type,
int lower,
int upper)
Creates a property with the specified name, type, lower bound, and upper bound as an owned attribute of this interface |
Operation |
createOwnedOperation(String name,
EList ownedParameterNames,
EList ownedParameterTypes)
Creates a new Operation , with the specified 'Name', 'Owned Parameter Names', and 'Owned Parameter Types', and appends it to the 'Owned Operation' containment reference list |
Operation |
createOwnedOperation(String name,
EList parameterNames,
EList parameterTypes,
Type returnType)
Creates an operation with the specified name, parameter names, parameter types, and return type (or null) as an owned operation of this interface |
Reception |
createOwnedReception(String name,
EList ownedParameterNames,
EList ownedParameterTypes)
Creates a new Reception , with the specified 'Name', 'Owned Parameter Names', and 'Owned Parameter Types', and appends it to the 'Owned Reception' containment reference list |
ProtocolStateMachine |
createProtocol(String name)
Creates a new ProtocolStateMachine ,with the specified 'Name', and sets the 'Protocol' containment reference |
Classifier |
getNestedClassifier(String name)
Retrieves the first Classifier with the specified 'Name' from the 'Nested Classifier' containment reference list |
Classifier |
getNestedClassifier(String name,
boolean ignoreCase,
EClass eClass,
boolean createOnDemand)
Retrieves the first Classifier with the specified 'Name' from the 'Nested Classifier' containment reference list |
EList |
getNestedClassifiers()
Returns the value of the 'Nested Classifier' containment reference list. |
Property |
getOwnedAttribute(String name,
Type type)
Retrieves the first Property with the specified 'Name', and 'Type' from the 'Owned Attribute' containment reference list |
Property |
getOwnedAttribute(String name,
Type type,
boolean ignoreCase,
EClass eClass,
boolean createOnDemand)
Retrieves the first Property with the specified 'Name', and 'Type' from the 'Owned Attribute' containment reference list |
EList |
getOwnedAttributes()
Returns the value of the 'Owned Attribute' containment reference list. |
Operation |
getOwnedOperation(String name,
EList ownedParameterNames,
EList ownedParameterTypes)
Retrieves the first Operation with the specified 'Name', 'Owned Parameter Names', and 'Owned Parameter Types' from the 'Owned Operation' containment reference list |
Operation |
getOwnedOperation(String name,
EList ownedParameterNames,
EList ownedParameterTypes,
boolean ignoreCase,
boolean createOnDemand)
Retrieves the first Operation with the specified 'Name', 'Owned Parameter Names', and 'Owned Parameter Types' from the 'Owned Operation' containment reference list |
EList |
getOwnedOperations()
Returns the value of the 'Owned Operation' containment reference list. |
Reception |
getOwnedReception(String name,
EList ownedParameterNames,
EList ownedParameterTypes)
Retrieves the first Reception with the specified 'Name', 'Owned Parameter Names', and 'Owned Parameter Types' from the 'Owned Reception' containment reference list |
Reception |
getOwnedReception(String name,
EList ownedParameterNames,
EList ownedParameterTypes,
boolean ignoreCase,
boolean createOnDemand)
Retrieves the first Reception with the specified 'Name', 'Owned Parameter Names', and 'Owned Parameter Types' from the 'Owned Reception' containment reference list |
EList |
getOwnedReceptions()
Returns the value of the 'Owned Reception' containment reference list. |
ProtocolStateMachine |
getProtocol()
Returns the value of the 'Protocol' containment reference |
Interface |
getRedefinedInterface(String name)
Retrieves the first Interface with the specified 'Name' from the 'Redefined Interface' reference list |
Interface |
getRedefinedInterface(String name,
boolean ignoreCase)
Retrieves the first Interface with the specified 'Name' from the 'Redefined Interface' reference list |
EList |
getRedefinedInterfaces()
Returns the value of the 'Redefined Interface' reference list. |
void |
setProtocol(ProtocolStateMachine value)
Sets the value of the ' Protocol ' containment reference |
boolean |
validateVisibility(DiagnosticChain diagnostics,
Map context)
The visibility of all features owned by an interface must be public. |
Methods inherited from interface org.eclipse.uml2.uml.NamedElement |
allNamespaces, allOwningPackages, createDependency, createNameExpression, getClientDependencies, getClientDependency, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, isSetName, isSetVisibility, separator, setName, setNameExpression, setVisibility, unsetName, unsetVisibility, validateHasNoQualifiedName, validateHasQualifiedName, validateVisibilityNeedsOwnership |
Methods inherited from interface org.eclipse.emf.ecore.EModelElement |
getEAnnotation, getEAnnotations |
Methods inherited from interface org.eclipse.emf.ecore.EObject |
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset |
Methods inherited from interface org.eclipse.emf.common.notify.Notifier |
eAdapters, eDeliver, eNotify, eSetDeliver |
Methods inherited from interface org.eclipse.uml2.uml.RedefinableElement |
getRedefinedElement, getRedefinedElement, getRedefinedElements, getRedefinitionContext, getRedefinitionContext, getRedefinitionContexts, isConsistentWith, isLeaf, isRedefinitionContextValid, setIsLeaf, validateRedefinitionConsistent, validateRedefinitionContextValid |
Methods inherited from interface org.eclipse.uml2.uml.Type |
conformsTo, createAssociation, getAssociations, getPackage, setPackage |
Methods inherited from interface org.eclipse.uml2.uml.ParameterableElement |
getOwningTemplateParameter, getTemplateParameter, isCompatibleWith, isTemplateParameter, setOwningTemplateParameter, setTemplateParameter |
Methods inherited from interface org.eclipse.uml2.uml.TemplateableElement |
createOwnedTemplateSignature, createOwnedTemplateSignature, createTemplateBinding, getOwnedTemplateSignature, getTemplateBinding, getTemplateBinding, getTemplateBindings, isTemplate, parameterableElements, setOwnedTemplateSignature |
Method Detail |
public EList getOwnedAttributes()
Property
.
The attributes (i.e. the properties) owned by the class.
UMLPackage.getInterface_OwnedAttribute()
public Property createOwnedAttribute(String name, Type type, EClass eClass)
Property
, with the specified 'Name', and 'Type', and appends it to the 'Owned Attribute' containment reference list.
name
- The 'Name' for the new Property
, or null
.type
- The 'Type' for the new Property
, or null
.eClass
- The Ecore class of the Property
to create.
Property
.Interface.getOwnedAttributes()
public Property createOwnedAttribute(String name, Type type)
Property
, with the specified 'Name', and 'Type', and appends it to the 'Owned Attribute' containment reference list.
name
- The 'Name' for the new Property
, or null
.type
- The 'Type' for the new Property
, or null
.
Property
.Interface.getOwnedAttributes()
public Property getOwnedAttribute(String name, Type type)
Property
with the specified 'Name', and 'Type' from the 'Owned Attribute' containment reference list.
name
- The 'Name' of the Property
to retrieve, or null
.type
- The 'Type' of the Property
to retrieve, or null
.
Property
with the specified 'Name', and 'Type', or null
.Interface.getOwnedAttributes()
public Property getOwnedAttribute(String name, Type type, boolean ignoreCase, EClass eClass, boolean createOnDemand)
Property
with the specified 'Name', and 'Type' from the 'Owned Attribute' containment reference list.
name
- The 'Name' of the Property
to retrieve, or null
.type
- The 'Type' of the Property
to retrieve, or null
.ignoreCase
- Whether to ignore case in String
comparisons.eClass
- The Ecore class of the Property
to retrieve, or null
.createOnDemand
- Whether to create a Property
on demand if not found.
Property
with the specified 'Name', and 'Type', or null
.Interface.getOwnedAttributes()
public EList getNestedClassifiers()
Classifier
.
References all the Classifiers that are defined (nested) within the Class.
UMLPackage.getInterface_NestedClassifier()
public Classifier createNestedClassifier(String name, EClass eClass)
Classifier
, with the specified 'Name', and appends it to the 'Nested Classifier' containment reference list.
name
- The 'Name' for the new Classifier
, or null
.eClass
- The Ecore class of the Classifier
to create.
Classifier
.Interface.getNestedClassifiers()
public Classifier getNestedClassifier(String name)
Classifier
with the specified 'Name' from the 'Nested Classifier' containment reference list.
name
- The 'Name' of the Classifier
to retrieve, or null
.
Classifier
with the specified 'Name', or null
.Interface.getNestedClassifiers()
public Classifier getNestedClassifier(String name, boolean ignoreCase, EClass eClass, boolean createOnDemand)
Classifier
with the specified 'Name' from the 'Nested Classifier' containment reference list.
name
- The 'Name' of the Classifier
to retrieve, or null
.ignoreCase
- Whether to ignore case in String
comparisons.eClass
- The Ecore class of the Classifier
to retrieve, or null
.createOnDemand
- Whether to create a Classifier
on demand if not found.
Classifier
with the specified 'Name', or null
.Interface.getNestedClassifiers()
public EList getRedefinedInterfaces()
Interface
.
References all the Interfaces redefined by this Interface.
UMLPackage.getInterface_RedefinedInterface()
public Interface getRedefinedInterface(String name)
Interface
with the specified 'Name' from the 'Redefined Interface' reference list.
name
- The 'Name' of the Interface
to retrieve, or null
.
Interface
with the specified 'Name', or null
.Interface.getRedefinedInterfaces()
public Interface getRedefinedInterface(String name, boolean ignoreCase)
Interface
with the specified 'Name' from the 'Redefined Interface' reference list.
name
- The 'Name' of the Interface
to retrieve, or null
.ignoreCase
- Whether to ignore case in String
comparisons.
Interface
with the specified 'Name', or null
.Interface.getRedefinedInterfaces()
public EList getOwnedReceptions()
Reception
.
Receptions that objects providing this interface are willing to accept.
UMLPackage.getInterface_OwnedReception()
public Reception createOwnedReception(String name, EList ownedParameterNames, EList ownedParameterTypes)
Reception
, with the specified 'Name', 'Owned Parameter Names', and 'Owned Parameter Types', and appends it to the 'Owned Reception' containment reference list.
name
- The 'Name' for the new Reception
, or null
.ownedParameterNames
- The 'Owned Parameter Names' for the new Reception
, or null
.ownedParameterTypes
- The 'Owned Parameter Types' for the new Reception
, or null
.
Reception
.Interface.getOwnedReceptions()
public Reception getOwnedReception(String name, EList ownedParameterNames, EList ownedParameterTypes)
Reception
with the specified 'Name', 'Owned Parameter Names', and 'Owned Parameter Types' from the 'Owned Reception' containment reference list.
name
- The 'Name' of the Reception
to retrieve, or null
.ownedParameterNames
- The 'Owned Parameter Names' of the Reception
to retrieve, or null
.ownedParameterTypes
- The 'Owned Parameter Types' of the Reception
to retrieve, or null
.
Reception
with the specified 'Name', 'Owned Parameter Names', and 'Owned Parameter Types', or null
.Interface.getOwnedReceptions()
public Reception getOwnedReception(String name, EList ownedParameterNames, EList ownedParameterTypes, boolean ignoreCase, boolean createOnDemand)
Reception
with the specified 'Name', 'Owned Parameter Names', and 'Owned Parameter Types' from the 'Owned Reception' containment reference list.
name
- The 'Name' of the Reception
to retrieve, or null
.ownedParameterNames
- The 'Owned Parameter Names' of the Reception
to retrieve, or null
.ownedParameterTypes
- The 'Owned Parameter Types' of the Reception
to retrieve, or null
.ignoreCase
- Whether to ignore case in String
comparisons.createOnDemand
- Whether to create a Reception
on demand if not found.
Reception
with the specified 'Name', 'Owned Parameter Names', and 'Owned Parameter Types', or null
.Interface.getOwnedReceptions()
public ProtocolStateMachine getProtocol()
Interface.setProtocol(ProtocolStateMachine)
,
UMLPackage.getInterface_Protocol()
public void setProtocol(ProtocolStateMachine value)
Protocol
' containment reference.
value
- the new value of the 'Protocol' containment reference.Interface.getProtocol()
public ProtocolStateMachine createProtocol(String name)
ProtocolStateMachine
,with the specified 'Name', and sets the 'Protocol' containment reference.
name
- The 'Name' for the new ProtocolStateMachine
, or null
.
ProtocolStateMachine
.Interface.getProtocol()
public EList getOwnedOperations()
Operation
.
It is bidirectional and its opposite is 'Interface
'.
The operations owned by the class.
UMLPackage.getInterface_OwnedOperation()
,
Operation.getInterface()
public Operation createOwnedOperation(String name, EList ownedParameterNames, EList ownedParameterTypes)
Operation
, with the specified 'Name', 'Owned Parameter Names', and 'Owned Parameter Types', and appends it to the 'Owned Operation' containment reference list.
name
- The 'Name' for the new Operation
, or null
.ownedParameterNames
- The 'Owned Parameter Names' for the new Operation
, or null
.ownedParameterTypes
- The 'Owned Parameter Types' for the new Operation
, or null
.
Operation
.Interface.getOwnedOperations()
public Operation getOwnedOperation(String name, EList ownedParameterNames, EList ownedParameterTypes)
Operation
with the specified 'Name', 'Owned Parameter Names', and 'Owned Parameter Types' from the 'Owned Operation' containment reference list.
name
- The 'Name' of the Operation
to retrieve, or null
.ownedParameterNames
- The 'Owned Parameter Names' of the Operation
to retrieve, or null
.ownedParameterTypes
- The 'Owned Parameter Types' of the Operation
to retrieve, or null
.
Operation
with the specified 'Name', 'Owned Parameter Names', and 'Owned Parameter Types', or null
.Interface.getOwnedOperations()
public Operation getOwnedOperation(String name, EList ownedParameterNames, EList ownedParameterTypes, boolean ignoreCase, boolean createOnDemand)
Operation
with the specified 'Name', 'Owned Parameter Names', and 'Owned Parameter Types' from the 'Owned Operation' containment reference list.
name
- The 'Name' of the Operation
to retrieve, or null
.ownedParameterNames
- The 'Owned Parameter Names' of the Operation
to retrieve, or null
.ownedParameterTypes
- The 'Owned Parameter Types' of the Operation
to retrieve, or null
.ignoreCase
- Whether to ignore case in String
comparisons.createOnDemand
- Whether to create a Operation
on demand if not found.
Operation
with the specified 'Name', 'Owned Parameter Names', and 'Owned Parameter Types', or null
.Interface.getOwnedOperations()
public boolean validateVisibility(DiagnosticChain diagnostics, Map context)
public Operation createOwnedOperation(String name, EList parameterNames, EList parameterTypes, Type returnType)
public Property createOwnedAttribute(String name, Type type, int lower, int upper)
|
Copyright 2003, 2006 IBM Corporation and others. All Rights Reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |