Skip to main content
typo corrected
Source Link
gnat
  • 20.5k
  • 29
  • 117
  • 310

If the tool you use for drawing the UML diagrams doesn't provide the (language specific) access specifier that you need, you canmcan still draw a useful class diagram.

The easiest way is just to leave out all the access specifiers. This doesn't mean that everything is now public, but rather that the diagram doesn't tell you if the members are public, private, package private or something else.

If you do want to show access specifiers, you also could label the package private members as protected members. While technically incorrect, protected access is the closest in meaning to package private access and is usually used only very little, so you could just add a note to your diagram that the protected access specifier should be read as package private.

If the tool you use for drawing the UML diagrams doesn't provide the (language specific) access specifier that you need, you canm still draw a useful class diagram.

The easiest way is just to leave out all the access specifiers. This doesn't mean that everything is now public, but rather that the diagram doesn't tell you if the members are public, private, package private or something else.

If you do want to show access specifiers, you also could label the package private members as protected members. While technically incorrect, protected access is the closest in meaning to package private access and is usually used only very little, so you could just add a note to your diagram that the protected access specifier should be read as package private.

If the tool you use for drawing the UML diagrams doesn't provide the (language specific) access specifier that you need, you can still draw a useful class diagram.

The easiest way is just to leave out all the access specifiers. This doesn't mean that everything is now public, but rather that the diagram doesn't tell you if the members are public, private, package private or something else.

If you do want to show access specifiers, you also could label the package private members as protected members. While technically incorrect, protected access is the closest in meaning to package private access and is usually used only very little, so you could just add a note to your diagram that the protected access specifier should be read as package private.

Source Link

If the tool you use for drawing the UML diagrams doesn't provide the (language specific) access specifier that you need, you canm still draw a useful class diagram.

The easiest way is just to leave out all the access specifiers. This doesn't mean that everything is now public, but rather that the diagram doesn't tell you if the members are public, private, package private or something else.

If you do want to show access specifiers, you also could label the package private members as protected members. While technically incorrect, protected access is the closest in meaning to package private access and is usually used only very little, so you could just add a note to your diagram that the protected access specifier should be read as package private.