• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java interfaces in a UML design doc

 
Barry Brashear
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know how to denote a java interface in a UML design document?
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Excellent question. UML has a "lollypop" decoration for interface - a short line with an open circle. Anybody know if Java practitioners interpret this literally as a Java interface? I criticized somebody's model recently because I didn't read it that way. Still don't know if he did.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "lollipop" is one way to depict an interface - another is to simply use an <<interface>> stereotype on a class.

Stan, how did you interprete the "lollipop"?
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I kinda ignored it . Back in the days we were getting Rational mentoring we were doing PowerBuilder. There was no "interface" in the language. We used lollypops to indicate something about a published public API that we expected others to use. We were probably mis-using it to express some scoping concept like public and REALLY public.

As for that recent incident, I was looking for <<interface>> on the diagram and not finding it. Somehow the lollypop didn't register as perhaps the same thing. What I was really looking for was DIP but that wasn't what the author was talking about, so there was pretty major disconnect on my part all along. Sigh, face-to-face wins over diagrams any day.
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Within Rational, we commonly use either the lollipop or the <<interface>> sterotype for Java interfaces. It's pretty much the standard.

Kyle
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Stan James:
We used lollypops to indicate something about a published public API that we expected others to use. We were probably mis-using it to express some scoping concept like public and REALLY public.


Ah, yes - the old public vs. published problem: http://www.martinfowler.com/ieeeSoftware/published.pdf <sigh>

IIRC, that's the way the lollipop is used in package diagrams - to depict the publi*shed* parts of a package.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic