On May 11, 2011, at 11:55 AM, Usman Bhatti wrote:
I am creating a C# extractor for Moose. I am using Fame for java to access Famix objects and populate their information (similar to VerveineJ). While creating Famix.Class objects for C# classes, I need to set parent namespace to represent the namespace that the class belongs to.
However, the Famix.Class only provides a single method to set the parent and that take a Famix.Package as a parameter. So, the following expression is an error for a Famix.Class object.
class.setParentPackage(Namespace)
Since, C# uses namespaces instead of Packages to organize classes,
but I guess that this the same in java. May be I'm incorrect but FAMIX class has Namespace and not package as parent.
it would be good to set a Famix.Namespace to be the parent of a class. Does meta-model not provide a way that we can set Famix.Namespace as a parent of a class.
Yes it should
I can see another method in the Famix.Class and that is SetContainer(ContainerEntity se). Can I use this method to set a Namespace to be the parent of a Class and keeping the parentPackage relationship empty?
thanks.
Usman
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev