Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow associations to interfaces #137

Closed
Nava2 opened this issue Aug 26, 2015 · 7 comments
Closed

Allow associations to interfaces #137

Nava2 opened this issue Aug 26, 2015 · 7 comments
Assignees
Labels
associations Related to umple associations Component-SemanticsAndGen Related to code generators in general and the meaning of Umple models contribSought Diffic-Med A non-trivial problem that may take over a week or may not be obvious how to fix or require analysis interfaces keyPortfolio Priority-VHigh This is a critical problem that needs immedate solution as it is blocking users Type-ProjectUG Particularly suitable and right-sized for undergraduate student projects ucosp Suitable for 4th year capstone projects

Comments

@Nava2
Copy link
Contributor

Nava2 commented Aug 26, 2015

Originally reported on Google Code with ID 237
Owned by quinlanjung


It should be possible to define a directed association to an interface. No code would
need to be generated in the interface. All you would be saying would be that the type
of the associated class should be any of the classes that implement the interface.

The following code won't compile, for example

// This is a snippet from the OCSF system see http://www.lloseng,com
interface ChatIF {
void display();
}

class ChatClient {
1 -> 1 ChatIF ui;
}

class ClientConsole {
isA ChatIF;
// Console UI. Code for display would be required.
}

An additional improvement would be to allow normal associations to interfaces. In that
case, the code would have to be generated in each of the implementing subclasses.


Reported by @umple on 2011-10-12 16:52:45

@Nava2
Copy link
Contributor Author

Nava2 commented Aug 26, 2015

I am escalating this since it is very important for a number of design cases.

One example is associating a class to any class that implements a certain interface
that has a certain behaviour. Essentially associating to an interface, which would
put that interface in the constructor, creates the notion of 'required interface' which
is the UML half-circle concept.


Reported by @umple on 2012-06-20 14:24:47

  • Status changed: Accepted
  • Labels added: Type-ProjectUG, Priority-High, contribSought, keyPortfolio, Diffic-Med
  • Labels removed: Type-Enhancement, Priority-Medium

@Nava2
Copy link
Contributor Author

Nava2 commented Aug 26, 2015

Reported by @umple on 2012-09-27 19:58:36

  • Owner removed

@Nava2 Nava2 added associations Related to umple associations Component-SemanticsAndGen Related to code generators in general and the meaning of Umple models keyPortfolio Status-Fixed Diffic-Med A non-trivial problem that may take over a week or may not be obvious how to fix or require analysis Type-ProjectUG Particularly suitable and right-sized for undergraduate student projects contribSought Priority-VHigh This is a critical problem that needs immedate solution as it is blocking users ucosp Suitable for 4th year capstone projects interfaces labels Aug 26, 2015
@Nava2
Copy link
Contributor Author

Nava2 commented Aug 26, 2015

Reported by @umple on 2012-10-12 15:21:33

  • Owner changed: stuart.marr.erskine
  • Labels added: ucosp

@Nava2
Copy link
Contributor Author

Nava2 commented Aug 26, 2015

Reported by @umple on 2012-12-11 13:10:09

  • Owner removed
  • Labels added: Priority-VHigh
  • Labels removed: Priority-High

@Nava2
Copy link
Contributor Author

Nava2 commented Aug 26, 2015

Reported by @umple on 2013-01-20 00:20:39

  • Owner changed: quinlanjung

@Nava2
Copy link
Contributor Author

Nava2 commented Aug 26, 2015

Here's another failing testcase that should be made to pass.

class X {
1 -> 0..1 Y;
}

interface Y {
m1()
}

class Z {
isA Y;
}

Also we need test cases that demonstrate that it will only work on -> associations,
so for example ought to raise an error saying that associations to interfaces must
be ->

class X {
1 -- 0..1 Y;
}

interface Y {
m1()
}

class Z {
isA Y;
}


Reported by @umple on 2013-01-20 00:28:39

@Nava2
Copy link
Contributor Author

Nava2 commented Aug 26, 2015

Reported by quinlanjung on 2013-02-05 21:51:43

  • Status changed: Fixed

@Nava2 Nava2 closed this as completed Aug 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
associations Related to umple associations Component-SemanticsAndGen Related to code generators in general and the meaning of Umple models contribSought Diffic-Med A non-trivial problem that may take over a week or may not be obvious how to fix or require analysis interfaces keyPortfolio Priority-VHigh This is a critical problem that needs immedate solution as it is blocking users Type-ProjectUG Particularly suitable and right-sized for undergraduate student projects ucosp Suitable for 4th year capstone projects
Projects
None yet
Development

No branches or pull requests

2 participants