File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
csharp/ql/lib/semmle/code/csharp Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,33 @@ class NamedElement extends Element, @named_element {
124
124
)
125
125
}
126
126
127
+ /**
128
+ * INTERNAL: Do not use.
129
+ *
130
+ * This is intended for DEBUG ONLY.
131
+ * Constructing the fully qualified name for all elements in a large codebase
132
+ * puts severe stress on the string pool.
133
+ *
134
+ * Gets the fully qualified name of this element, for example the
135
+ * fully qualified name of `M` on line 3 is `N.C.M` in
136
+ *
137
+ * ```csharp
138
+ * namespace N {
139
+ * class C {
140
+ * void M(int i, string s) { }
141
+ * }
142
+ * }
143
+ * ```
144
+ *
145
+ * Unbound generic types, such as `IList<T>`, are represented as
146
+ * ``System.Collections.Generic.IList`1``.
147
+ */
148
+ final string getFullyQualifiedNameDebug ( ) {
149
+ exists ( string qualifier , string name | this .hasFullyQualifiedName ( qualifier , name ) |
150
+ if qualifier = "" then result = name else result = qualifier + "." + name
151
+ )
152
+ }
153
+
127
154
/** Holds if this element has the fully qualified name `qualifier`.`name`. */
128
155
cached
129
156
predicate hasFullyQualifiedName ( string qualifier , string name ) {
You can’t perform that action at this time.
0 commit comments