Platform-independent UML uses different notation to denote visibility than does Java-specific UML. While Java-specific UML uses the same keywords as Java code syntax itself (
package), platform-independent UML instead uses
#for protected, and
NetBeans makes attributes private by default in both forms of UML and makes operations public by default in both forms of UML. If the developer specifies a visibility for operations or attributes that is not recognized by NetBeans, NetBeans will make that operation or attribute
packagevisibility in Java-specific UML and will mark such an operation or attribute with a
~symbol in platform-independent UML.
The following two PNG files were exported from NetBeans using its "Export as Image" (CTRL+Shift+X) option. They show how NetBeans 6.1 treats attributes and operations of these various visibilities in Java-specific UML and platform-independent UML respectively.
Note that NetBeans automatically creates a constructor for Java-specific classes and also automatically generates get/set accessor methods for all added attributes no matter the visibility of those attributes.
Note that no constructors or accessor methods are automatically created by NetBeans for platform-independent UML.