Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Should reference to EDataType be containment or not?
Should reference to EDataType be containment or not? [message #422540] Mon, 08 September 2008 22:33 Go to next message
Bryan Hunt is currently offline Bryan HuntFriend
Messages: 366
Registered: July 2009
Senior Member
If I model a class such as:

public class Foo
{
private EDataType type;
}

should I model type as containment or non-containment? My guess is
non-containment, but the whole meta - meta thing hurts my head
sometimes, and I just wanted to be sure.

Bryan
Re: Should reference to EDataType be containment or not? [message #422545 is a reply to message #422540] Mon, 08 September 2008 22:58 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Bryan,

Comments below.

Bryan Hunt wrote:
> If I model a class such as:
>
> public class Foo
> {
> private EDataType type;
> }
>
> should I model type as containment or non-containment? My guess is
> non-containment, but the whole meta - meta thing hurts my head
> sometimes, and I just wanted to be sure.
An EDataType is a thing from the Ecore model and generally an EDataType
is an EClassifier so we would expect such an EClassifier is contained by
an EPackage's getEClassifiers. An EClassifier that isn't contained by
an EPackage doesn't have much meaning, i.e., we can't figure out what
factory would be used for converting values to and from a string the way
EcoreUtil.convertToString/createFromString would normally do it.
>
> Bryan
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Constraints Using OCL (Dave S. please help me)
Next Topic:Containment
Goto Forum:
  


Current Time: Wed Apr 24 16:33:15 GMT 2024

Powered by FUDForum. Page generated in 0.03127 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top