Book a Demo

Author Topic: Interface modelling question  (Read 6150 times)

j33@1

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Interface modelling question
« on: January 06, 2006, 03:00:00 pm »
How do model a constraint that a (abstract) class can implement a subset of a particular set of interface?

I try to put a multiplicity on the realization connector but it does not show up. To even do this I have a marker interface, which I've read is bad practice, from which all the interface in the set inherit.

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: Interface modelling question
« Reply #1 on: January 16, 2006, 08:18:15 pm »
You need to rethnk what you're trying to do.  

If you really are trying to do what you say you are trying to do, you are in violation of many UML and OO axioms.

Otherwise, try restating your question more clearly.
Verbal Use Cases aren't worth the paper they are written upon.

j33@1

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Re: Interface modelling question
« Reply #2 on: January 17, 2006, 11:22:43 am »
Which axioms?

I have distinct set of interfaces.
I was having all these interface inherit from a marker interface.
Both of these are to help in a factory pattern.

I need concrete implementations.
The concrete implementations must support 1 to many of these interfaces.

How do I show this in UML?

I had thought I could have an abstract class from which the concrete classes would derive. The abstract class would have a realization link to the base interface and then somehow show the 1 to many realizations. I see I can attach a textual constraint to a realization link.

This would be useful for a generic look. I would also imagine that each concrete class would have realization links to the specific interfaces.

--TIA

JohnWSaundersIII

  • EA User
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: Interface modelling question
« Reply #3 on: January 17, 2006, 12:27:48 pm »
You don't want to enumerate the interfaces which the concrete classes must implement.  You just want to specify that the concrete classes must implement the base interface, since that's all that the callers of the concrete classes can depend on.

John Saunders
John Saunders