File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes OO, Patterns, UML and Refactoring and the fly likes quick question on java interface. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Reply Bookmark "quick question on java interface." Watch "quick question on java interface." New topic
Author

quick question on java interface.

Richard Agnes
Greenhorn

Joined: Feb 12, 2001
Posts: 22
how do we model a java interface in UML class diagram?
is it a generalization? association? other...
cheers.
Michael Pearson
Ranch Hand

Joined: Mar 11, 2001
Posts: 351
(1)
An interface is used to implement multiple inheritance in Java.
(2)
The UML modeling is similar to Generalization. Generalization is modeled with a line that has an open arrow pointing from the subclass to the superclass. An interface is shown with a dashed line that has an open arrow pointing from the class that implements the interface toward the interface.
Here's a simplified class diagram that shows the interface IsList being implemented by the class SortNames.
The dashed line with the simple arrow pointing from SortNames to TextFileIn represents an include relationship.


[This message has been edited by Michael Pearson (edited August 01, 2001).]
 
 
subject: quick question on java interface.
 
Threads others viewed
Doubt in servlet API
interface
Command Interface
Is There Null Interface in Java?
why interface
IntelliJ Java IDE