Home » Modeling » UML2 » type conformance
| | | |
Re: type conformance [message #470412 is a reply to message #470406] |
Wed, 14 February 2007 12:40 |
Rafael Chaves Messages: 362 Registered: July 2009 |
Senior Member |
|
|
True, I didn't realize that all subclasses of Type are also Classifiers.
Then the spec issue was a red herring. I was having problems and really
thought I saw the behavior I described, I guess based on Type#conformsTo
spec and impl. But as you pointed out, that code is never be executed,
so the behavior I described actually can never happen.
Thanks,
Rafael
Kenn Hussey wrote:
> Note, however, that Classifier is the only specialization of Type in UML,
> and since Type is abstract, in practice you should expect that all types
> (classifiers) from UML conform to themselves...
>
> Kenn
>
> "James Bruck" <jbruck@ca.ibm.com> wrote in message
> news:eqtphb$oj1$1@utils.eclipse.org...
>> Hi Rafael.
>>
>> Have a look at the spec on p. 138 under "Type". It states: " The query
>> conformsTo() gives true for a type that conforms to another. By default,
>> two types do not conform to each other. This query is intended to be
>> redefined for specific conformance situations."
>>
>> So in your code snippet it I would expect the result to always be false.
>>
>> By the way, the documentation for the API (ie have a look at
>> "Type.conformsTo()" ) is derived from the spec so you often don't have to
>> dig your way through the spec to discover the intention behind the public
>> API.
>>
>> Regards,
>>
>> - James.
>>
>>
>> "Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
>> news:eqsqgo$tbr$1@utils.eclipse.org...
>>> For the following snippet:
>>>
>>> Type t = ...
>>> System.out.println(t.conformsTo(t));
>>>
>>> This always produces "false" (unless t is a Classifier). A type should at
>>> least conform to itself, shouldn't it?
>>>
>>> Rafael
>>
>
>
|
|
| | | |
Re: type conformance [message #588708 is a reply to message #470406] |
Wed, 14 February 2007 12:40 |
Rafael Chaves Messages: 362 Registered: July 2009 |
Senior Member |
|
|
True, I didn't realize that all subclasses of Type are also Classifiers.
Then the spec issue was a red herring. I was having problems and really
thought I saw the behavior I described, I guess based on Type#conformsTo
spec and impl. But as you pointed out, that code is never be executed,
so the behavior I described actually can never happen.
Thanks,
Rafael
Kenn Hussey wrote:
> Note, however, that Classifier is the only specialization of Type in UML,
> and since Type is abstract, in practice you should expect that all types
> (classifiers) from UML conform to themselves...
>
> Kenn
>
> "James Bruck" <jbruck@ca.ibm.com> wrote in message
> news:eqtphb$oj1$1@utils.eclipse.org...
>> Hi Rafael.
>>
>> Have a look at the spec on p. 138 under "Type". It states: " The query
>> conformsTo() gives true for a type that conforms to another. By default,
>> two types do not conform to each other. This query is intended to be
>> redefined for specific conformance situations."
>>
>> So in your code snippet it I would expect the result to always be false.
>>
>> By the way, the documentation for the API (ie have a look at
>> "Type.conformsTo()" ) is derived from the spec so you often don't have to
>> dig your way through the spec to discover the intention behind the public
>> API.
>>
>> Regards,
>>
>> - James.
>>
>>
>> "Rafael Chaves" <chaves@inf.ufsc.nospam.br> wrote in message
>> news:eqsqgo$tbr$1@utils.eclipse.org...
>>> For the following snippet:
>>>
>>> Type t = ...
>>> System.out.println(t.conformsTo(t));
>>>
>>> This always produces "false" (unless t is a Classifier). A type should at
>>> least conform to itself, shouldn't it?
>>>
>>> Rafael
>>
>
>
|
|
|
Goto Forum:
Current Time: Tue Sep 24 14:53:44 GMT 2024
Powered by FUDForum. Page generated in 0.04772 seconds
|