@@ -16,13 +16,9 @@ private import codeql.ruby.dataflow.RemoteFlowSources
1616 * Extend this class to refine existing API models. If you want to model new APIs,
1717 * extend `SqlExecution::Range` instead.
1818 */
19- class SqlExecution extends DataFlow:: Node {
20- SqlExecution:: Range range ;
21-
22- SqlExecution ( ) { this = range }
23-
19+ class SqlExecution extends DataFlow:: Node instanceof SqlExecution:: Range {
2420 /** Gets the argument that specifies the SQL statements to be executed. */
25- DataFlow:: Node getSql ( ) { result = range .getSql ( ) }
21+ DataFlow:: Node getSql ( ) { result = super .getSql ( ) }
2622}
2723
2824/** Provides a class for modeling new SQL execution APIs. */
@@ -46,26 +42,23 @@ module SqlExecution {
4642 * Extend this class to refine existing API models. If you want to model new APIs,
4743 * extend `Escaping::Range` instead.
4844 */
49- class Escaping extends DataFlow:: Node {
50- Escaping:: Range range ;
51-
45+ class Escaping extends DataFlow:: Node instanceof Escaping:: Range {
5246 Escaping ( ) {
53- this = range and
5447 // escapes that don't have _both_ input/output defined are not valid
55- exists ( range .getAnInput ( ) ) and
56- exists ( range .getOutput ( ) )
48+ exists ( super .getAnInput ( ) ) and
49+ exists ( super .getOutput ( ) )
5750 }
5851
5952 /** Gets an input that will be escaped. */
60- DataFlow:: Node getAnInput ( ) { result = range .getAnInput ( ) }
53+ DataFlow:: Node getAnInput ( ) { result = super .getAnInput ( ) }
6154
6255 /** Gets the output that contains the escaped data. */
63- DataFlow:: Node getOutput ( ) { result = range .getOutput ( ) }
56+ DataFlow:: Node getOutput ( ) { result = super .getOutput ( ) }
6457
6558 /**
6659 * Gets the context that this function escapes for, such as `html`, or `url`.
6760 */
68- string getKind ( ) { result = range .getKind ( ) }
61+ string getKind ( ) { result = super .getKind ( ) }
6962}
7063
7164/** Provides a class for modeling new escaping APIs. */
@@ -103,7 +96,7 @@ module Escaping {
10396 * `<p>{}</p>`.
10497 */
10598class HtmlEscaping extends Escaping {
106- HtmlEscaping ( ) { range .getKind ( ) = Escaping:: getHtmlKind ( ) }
99+ HtmlEscaping ( ) { super .getKind ( ) = Escaping:: getHtmlKind ( ) }
107100}
108101
109102/** Provides classes for modeling HTTP-related APIs. */
@@ -116,29 +109,25 @@ module HTTP {
116109 * Extend this class to refine existing API models. If you want to model new APIs,
117110 * extend `RouteSetup::Range` instead.
118111 */
119- class RouteSetup extends DataFlow:: Node {
120- RouteSetup:: Range range ;
121-
122- RouteSetup ( ) { this = range }
123-
112+ class RouteSetup extends DataFlow:: Node instanceof RouteSetup:: Range {
124113 /** Gets the URL pattern for this route, if it can be statically determined. */
125- string getUrlPattern ( ) { result = range .getUrlPattern ( ) }
114+ string getUrlPattern ( ) { result = super .getUrlPattern ( ) }
126115
127116 /**
128117 * Gets a function that will handle incoming requests for this route, if any.
129118 *
130119 * NOTE: This will be modified in the near future to have a `RequestHandler` result, instead of a `Method`.
131120 */
132- Method getARequestHandler ( ) { result = range .getARequestHandler ( ) }
121+ Method getARequestHandler ( ) { result = super .getARequestHandler ( ) }
133122
134123 /**
135124 * Gets a parameter that will receive parts of the url when handling incoming
136125 * requests for this route, if any. These automatically become a `RemoteFlowSource`.
137126 */
138- Parameter getARoutedParameter ( ) { result = range .getARoutedParameter ( ) }
127+ Parameter getARoutedParameter ( ) { result = super .getARoutedParameter ( ) }
139128
140129 /** Gets a string that identifies the framework used for this route setup. */
141- string getFramework ( ) { result = range .getFramework ( ) }
130+ string getFramework ( ) { result = super .getFramework ( ) }
142131 }
143132
144133 /** Provides a class for modeling new HTTP routing APIs. */
@@ -185,19 +174,15 @@ module HTTP {
185174 * Extend this class to refine existing API models. If you want to model new APIs,
186175 * extend `RequestHandler::Range` instead.
187176 */
188- class RequestHandler extends Method {
189- RequestHandler:: Range range ;
190-
191- RequestHandler ( ) { this = range }
192-
177+ class RequestHandler extends Method instanceof RequestHandler:: Range {
193178 /**
194179 * Gets a parameter that could receive parts of the url when handling incoming
195180 * requests, if any. These automatically become a `RemoteFlowSource`.
196181 */
197- Parameter getARoutedParameter ( ) { result = range .getARoutedParameter ( ) }
182+ Parameter getARoutedParameter ( ) { result = super .getARoutedParameter ( ) }
198183
199184 /** Gets a string that identifies the framework used for this route setup. */
200- string getFramework ( ) { result = range .getFramework ( ) }
185+ string getFramework ( ) { result = super .getFramework ( ) }
201186 }
202187
203188 /** Provides a class for modeling new HTTP request handlers. */
@@ -253,16 +238,12 @@ module HTTP {
253238 * Extend this class to refine existing API models. If you want to model new APIs,
254239 * extend `HttpResponse::Range` instead.
255240 */
256- class HttpResponse extends DataFlow:: Node {
257- HttpResponse:: Range range ;
258-
259- HttpResponse ( ) { this = range }
260-
241+ class HttpResponse extends DataFlow:: Node instanceof HttpResponse:: Range {
261242 /** Gets the data-flow node that specifies the body of this HTTP response. */
262- DataFlow:: Node getBody ( ) { result = range .getBody ( ) }
243+ DataFlow:: Node getBody ( ) { result = super .getBody ( ) }
263244
264245 /** Gets the mimetype of this HTTP response, if it can be statically determined. */
265- string getMimetype ( ) { result = range .getMimetype ( ) }
246+ string getMimetype ( ) { result = super .getMimetype ( ) }
266247 }
267248
268249 /** Provides a class for modeling new HTTP response APIs. */
@@ -308,13 +289,9 @@ module HTTP {
308289 * Extend this class to refine existing API models. If you want to model new APIs,
309290 * extend `HttpRedirectResponse::Range` instead.
310291 */
311- class HttpRedirectResponse extends HttpResponse {
312- override HttpRedirectResponse:: Range range ;
313-
314- HttpRedirectResponse ( ) { this = range }
315-
292+ class HttpRedirectResponse extends HttpResponse instanceof HttpRedirectResponse:: Range {
316293 /** Gets the data-flow node that specifies the location of this HTTP redirect response. */
317- DataFlow:: Node getRedirectLocation ( ) { result = range .getRedirectLocation ( ) }
294+ DataFlow:: Node getRedirectLocation ( ) { result = super .getRedirectLocation ( ) }
318295 }
319296
320297 /** Provides a class for modeling new HTTP redirect response APIs. */
0 commit comments