13

I am new to UML. I have found these symbols for showing different access modifiers in UML:

  • + is for Public
  • - is for Private
  • # is for Protected
  • ~ is for Internal

But in the reference that I consulted, there is no symbol for "Protected Internal."

Would the compound symbol #~ be appropriate?

DavidRR
  • 18,291
  • 25
  • 109
  • 191
Vaibhav Jain
  • 33,887
  • 46
  • 110
  • 163
  • What reference did you consult? And to what UML diagram does your question apply? Wikipedia defines `~` to mean "Package" in its article about the [UML Class diagram](https://en.wikipedia.org/wiki/Class_diagram#Visibility). – DavidRR Aug 29 '17 at 21:06

2 Answers2

8

Unfortunately, there isn't a symbol (or combination of symbols) that means "Protected Internal." That is because the internal keyword is specific to C#, whereas UML was developed as a universal markup language. However, you can come to an agreement for using a particular symbol within your company.

DavidRR
  • 18,291
  • 25
  • 109
  • 191
Boris Modylevsky
  • 3,029
  • 1
  • 26
  • 42
2

Not a beautiful solution, but you could also (ab)use a stereotype for it which you'd apply to the attributes/methods.

sunside
  • 8,069
  • 9
  • 51
  • 74