The symbols for access modifiers that I know are relevant for many different languages:

public:        +
private:       -
protected:  #
package:    ~ (or none)

However, in VB.NET there are other such access modifiers -- friend, and protected friend (these are called internal and protected internal in c#). What are the UML symbols for these access modifiers?

Is friend close enough to "package access" that it could be denoted with a tilde "~"? Would that then mean that protected friend could be denoted as "#~"?


1 Answer 1


According to CSU Santa Barbara's web site:

We sometimes need an operation that has full access to a classes private information and yet must not be applied to a single object. In C++, for example, we have "friend functions" and "friend operations". These are indicated by placing the stereotype "<<friend>>" in front of the operation in the UML class diagram.

So you just annotate it and it is understood by other UML users.

  • friend in C++ is very different from Friend in VB.NET.
    – svick
    Aug 12, 2013 at 19:46
  • 1
    @svick That's beside the point. In both cases, there is no symbol defined by the UML language standard to represent that visibility. The approach would be the same.
    – Thomas Owens
    Aug 12, 2013 at 20:29
  • Thanks @DDay, based on your answer I think that maybe a combination of both a stereotype and an access modifier might be useful for protected friend -- <<friend>>#.
    – user75187
    Aug 13, 2013 at 2:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.