Element Visibility

Element Visibility

Elements in a package may have public or private visibility . Elements with public visibility are accessible outside the package. Elements with private visibility are available only to other elements inside the package. You can model public or private visibility in UML by writing a plus or minus symbol in front of the element's name, as shown in Figure.

Since MD5Crypt has private visibility, it isn't accessible outside the security package

In Java, public and private visibility corresponds to a class being public or private to a Java package. A Java class is marked as public to a package by the public access modifier, as in:

public class Credentials {}

If the public keyword is absent, then the class is private to the package. Many UML tools don't offer the plus and minus symbols to show element visibility, so don't be surprised if yours doesn't.

 Python   SQL   Java   php   Perl 
 game development   web development   internet   *nix   graphics   hardware 
 telecommunications   C++ 
 Flash   Active Directory   Windows