Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Private Class from different Namespace as property type
Private Class from different Namespace as property type [message #626152] Sun, 09 March 2008 10:18
Felix Dorner is currently offline Felix DornerFriend
Messages: 676
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit


I am stuck with the namespace mechanism. Reading the specs over and over
again, many things remain unclear to me, e.g.:

Suppose the class AClass is owned by a package A. Now AClass want's to
have a property of type BClass, which is owed by a package B.
Intuitively, this is only possible if the visibility of BClass is
public. I'd really rely on the specification to confirm this, but
reading it is a nightmare. I therefore experiment with the API and
created an example model that reflects the above structures. Contrary to
the intuition, even if I make BClass private, I can assign BClass as the
type of a property in AClass, and validation completes successfully!?
The model is attached. So there's two possibilities:
a. My intuition is wrong
b. The validation check is wrong / incomplete

Thanks for your comments.


Content-Type: text/xml;
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;

<?xml version="1.0" encoding="UTF-8"?>
<uml:Model xmi:version="2.1" xmlns:xmi="" xmlns:uml="" xmi:id="_Kv-j4O3BEdywkskpwYWWXg" name="visibilitytest">
<packagedElement xmi:type="uml:Package" xmi:id="_NpnDcO3BEdywkskpwYWWXg" name="a">
<packagedElement xmi:type="uml:Class" xmi:id="_PfzwEO3BEdywkskpwYWWXg" name="AClass" visibility="private"/>
<packagedElement xmi:type="uml:Package" xmi:id="_RnYgkO3BEdywkskpwYWWXg" name="b">
<packagedElement xmi:type="uml:Class" xmi:id="_TFKGIO3BEdywkskpwYWWXg" name="BClass">
<ownedAttribute xmi:id="_VZijkO3BEdywkskpwYWWXg" name="bclass" type="_TFKGIO3BEdywkskpwYWWXg"/>

Previous Topic:[Announce] MDT UML2 2.0.5 M200802262248 is available
Next Topic:Package::makesVisible insufficiently defined as OCL?
Goto Forum:

Current Time: Tue Aug 09 14:36:58 GMT 2022

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

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

Back to the top