13.3. Element VisibilityElements 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 13-11. Figure 13-11. Since MD5Crypt has private visibility, it isn't accessible outside the security packageIn 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. |