|Re: Arrays and Constructors in Class Diagram [message #1692113 is a reply to message #1692040]
||Mon, 13 April 2015 14:21
|| Christian Damus
Registered: July 2009
The Java Profile has stereotypes that convey Java-specific semantics:
* <<javaMethod>> has an 'isConstructor' attribute
* <<primitiveType>> has an 'implementationClass' attribute
For array types, you might just need to model them explicitly as
DataTypes of some kind. Perhaps the <<primitiveType>>
'implementationClass' attribute could let you specify the array
declaration, e.g., 'MyDataType' or even something like
Hopefully someone responsible for the Java component can chime in with
a better answer about array types ...
On 2015-04-13 12:49:28 +0000, Karel Mous said:
> Am currently using Papyrus 1.0.2 with Eclipse Luna. Am currently
> attempting to create some Class Diagrams, using the Java Profile and
> Java primitive types.
> Would like to ask the following, since I have been unable to figure out
> how to do it:
> - How can I define a Constructor in a Class? Every operation I try to
> create will have a "void" return type if nothing is set.
> - How can I create a array in the Class. I know I can set the
> multiplicity of an attribute, but when generating code, the attribute
> comes out like this: "List<DataType> var". I would like it to be a real
> array, like this: "DataType var".
> Anybody have any idea how to do it, if it's possible?
Powered by FUDForum
. Page generated in 0.01437 seconds