@@ -120,15 +120,6 @@ abstract private class GeneratedType extends Type, GeneratedElement {
120
120
else result = ""
121
121
}
122
122
123
- private string stubComment ( ) {
124
- exists ( string qualifier , string name |
125
- this .hasQualifiedName ( qualifier , name ) and
126
- result =
127
- "// Generated from `" + getQualifiedName ( qualifier , name ) + "` in `" +
128
- concat ( this .getALocation ( ) .toString ( ) , "; " ) + "`\n"
129
- )
130
- }
131
-
132
123
/** Gets the entire C# stub code for this type. */
133
124
pragma [ nomagic]
134
125
final string getStub ( Assembly assembly ) {
@@ -141,17 +132,16 @@ abstract private class GeneratedType extends Type, GeneratedElement {
141
132
else (
142
133
not this instanceof DelegateType and
143
134
result =
144
- this .stubComment ( ) + this . stubAttributes ( ) + stubAccessibility ( this ) +
145
- this .stubAbstractModifier ( ) + this .stubStaticModifier ( ) + this .stubPartialModifier ( ) +
146
- this .stubKeyword ( ) + " " + this . getUndecoratedName ( ) + stubGenericArguments ( this ) +
147
- this . stubBaseTypesString ( ) + stubTypeParametersConstraints ( this ) + "\n{\n" +
148
- this .stubPrivateConstructor ( ) + this . stubMembers ( assembly ) + "}\n\n"
135
+ this .stubAttributes ( ) + stubAccessibility ( this ) + this . stubAbstractModifier ( ) +
136
+ this .stubStaticModifier ( ) + this .stubPartialModifier ( ) + this .stubKeyword ( ) + " " +
137
+ this .getUndecoratedName ( ) + stubGenericArguments ( this ) + this . stubBaseTypesString ( ) +
138
+ stubTypeParametersConstraints ( this ) + "\n{\n" + this . stubPrivateConstructor ( ) +
139
+ this .stubMembers ( assembly ) + "}\n\n"
149
140
or
150
141
result =
151
- this .stubComment ( ) + this .stubAttributes ( ) + stubUnsafe ( this ) + stubAccessibility ( this ) +
152
- this .stubKeyword ( ) + " " + stubClassName ( this .( DelegateType ) .getReturnType ( ) ) + " " +
153
- this .getUndecoratedName ( ) + stubGenericArguments ( this ) + "(" + stubParameters ( this ) +
154
- ");\n\n"
142
+ this .stubAttributes ( ) + stubUnsafe ( this ) + stubAccessibility ( this ) + this .stubKeyword ( ) +
143
+ " " + stubClassName ( this .( DelegateType ) .getReturnType ( ) ) + " " + this .getUndecoratedName ( )
144
+ + stubGenericArguments ( this ) + "(" + stubParameters ( this ) + ");\n\n"
155
145
)
156
146
}
157
147
@@ -968,6 +958,8 @@ private string stubSemmleExtractorOptions() {
968
958
/** Gets the generated C# code. */
969
959
string generatedCode ( Assembly assembly ) {
970
960
result =
971
- "// This file contains auto-generated code.\n" + stubSemmleExtractorOptions ( ) + "\n" +
972
- any ( GeneratedNamespace ns | ns .isGlobalNamespace ( ) ) .getStubs ( assembly )
961
+ "// This file contains auto-generated code.\n" //
962
+ + "// Generated from `" + assembly .getFullName ( ) + "`.\n" //
963
+ + stubSemmleExtractorOptions ( ) + "\n" //
964
+ + any ( GeneratedNamespace ns | ns .isGlobalNamespace ( ) ) .getStubs ( assembly )
973
965
}
0 commit comments