Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » createClass and createOwnedClass
createClass and createOwnedClass [message #759329] Mon, 28 November 2011 06:56 Go to next message
Eclipse User
Hi,

what's the difference between UMLFactory.eINSTANCE.createClass() and
org.eclipse.uml2.uml.Model::createOwnedClass() ? Why they both exist?
Same question can be related to UMLFactory.eINSTANCE.createAssociation()
and org.eclipse.uml2.uml.Class::createAssociation()

Thanks in advance
Re: createClass and createOwnedClass [message #759467 is a reply to message #759329] Mon, 28 November 2011 13:54 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4014
Registered: July 2009
Senior Member
Hi

XXXFactory.eINSTANCE.createYYY() is the standard EMF functionality to
create a naked YYY.

org.eclipse.uml2.uml.Model::createOwnedClass() has some context, so I
preume it establishes the result as an ownedClass.

Regards

Ed Willink

On 28/11/2011 11:56, Emil Huseynli wrote:
> Hi,
>
> what's the difference between UMLFactory.eINSTANCE.createClass() and
> org.eclipse.uml2.uml.Model::createOwnedClass() ? Why they both exist?
> Same question can be related to
> UMLFactory.eINSTANCE.createAssociation() and
> org.eclipse.uml2.uml.Class::createAssociation()
>
> Thanks in advance
Re: createClass and createOwnedClass [message #759495 is a reply to message #759467] Mon, 28 November 2011 14:47 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25946
Registered: July 2009
Senior Member
Yes. In fact you can look at the implementation to see what it does, so
no presumption is required...


On 28/11/2011 7:54 PM, Ed Willink wrote:
> Hi
>
> XXXFactory.eINSTANCE.createYYY() is the standard EMF functionality to
> create a naked YYY.
>
> org.eclipse.uml2.uml.Model::createOwnedClass() has some context, so I
> preume it establishes the result as an ownedClass.
>
> Regards
>
> Ed Willink
>
> On 28/11/2011 11:56, Emil Huseynli wrote:
>> Hi,
>>
>> what's the difference between UMLFactory.eINSTANCE.createClass() and
>> org.eclipse.uml2.uml.Model::createOwnedClass() ? Why they both exist?
>> Same question can be related to
>> UMLFactory.eINSTANCE.createAssociation() and
>> org.eclipse.uml2.uml.Class::createAssociation()
>>
>> Thanks in advance
>
Previous Topic:How to add an InstanceSpecification to a Package
Next Topic:Set and Bag types
Goto Forum:
  


Current Time: Wed Jul 30 15:18:06 EDT 2014

Powered by FUDForum. Page generated in 0.02465 seconds