@@ -99,8 +99,15 @@ class Modifiable extends Declaration, @modifiable {
9999 private predicate isReallyPrivate ( ) { this .isPrivate ( ) and not this .isProtected ( ) }
100100
101101 /**
102- * Holds if this declaration is effectively `private` (either directly or
103- * because one of the enclosing types is `private`).
102+ * Holds if this declaration is effectively `private`. A declaration is considered
103+ * effectively `private` if it can only be referenced from
104+ * - the declaring and its nested types, similarly to `private` declarations, and
105+ * - the enclosing types.
106+ *
107+ * Note that explicit interface implementation are also considered effectively
108+ * `private` if the implemented interface is itself effectively `private`. Finally,
109+ * `private protected` members are not considered effectively `private`, because
110+ * they can be overriden within the declaring assembly.
104111 */
105112 predicate isEffectivelyPrivate ( ) {
106113 this .isReallyPrivate ( ) or
@@ -115,8 +122,14 @@ class Modifiable extends Declaration, @modifiable {
115122 }
116123
117124 /**
118- * Holds if this declaration is effectively `internal` (either directly or
119- * because one of the enclosing types is `internal`).
125+ * Holds if this declaration is effectively `internal`. A declaration is considered
126+ * effectively `internal` if it can only be referenced from the declaring assembly.
127+ *
128+ * Note that friend assemblies declared in `InternalsVisibleToAttribute` are not
129+ * considered. Explicit interface implementation are also considered effectively
130+ * `internal` if the implemented interface is itself effectively `internal`. Finally,
131+ * `internal protected` members are not considered effectively `internal`, because
132+ * they can be overriden outside the declaring assembly.
120133 */
121134 predicate isEffectivelyInternal ( ) {
122135 this .isReallyInternal ( ) or
@@ -125,8 +138,8 @@ class Modifiable extends Declaration, @modifiable {
125138 }
126139
127140 /**
128- * Holds if this declaration is effectively `public`, because it
129- * and all enclosing types are `public` .
141+ * Holds if this declaration is effectively `public`, meaning that it can be
142+ * referenced outside the declaring assembly .
130143 */
131144 predicate isEffectivelyPublic ( ) { not isEffectivelyPrivate ( ) and not isEffectivelyInternal ( ) }
132145}
0 commit comments