@@ -31,11 +31,7 @@ module HTTP {
3131 * Extend this class to refine existing API models. If you want to model new APIs,
3232 * extend `HTTP::ResponseWriter::Range` instead.
3333 */
34- class ResponseWriter extends Variable {
35- ResponseWriter:: Range self ;
36-
37- ResponseWriter ( ) { this = self }
38-
34+ class ResponseWriter extends Variable instanceof ResponseWriter:: Range {
3935 /** Gets the body that is written in this HTTP response. */
4036 ResponseBody getBody ( ) { result .getResponseWriter ( ) = this }
4137
@@ -47,8 +43,8 @@ module HTTP {
4743
4844 /** Gets a data-flow node that is a use of this response writer. */
4945 DataFlow:: Node getANode ( ) {
50- result = self .getANode ( ) or
51- result .( DataFlow:: PostUpdateNode ) .getPreUpdateNode ( ) = self .getANode ( )
46+ result = super .getANode ( ) or
47+ result .( DataFlow:: PostUpdateNode ) .getPreUpdateNode ( ) = super .getANode ( )
5248 }
5349 }
5450
@@ -100,19 +96,15 @@ module HTTP {
10096 * Extend this class to refine existing API models. If you want to model new APIs,
10197 * extend `HTTP::HeaderWrite::Range` instead.
10298 */
103- class HeaderWrite extends DataFlow:: ExprNode {
104- HeaderWrite:: Range self ;
105-
106- HeaderWrite ( ) { this = self }
107-
99+ class HeaderWrite extends DataFlow:: ExprNode instanceof HeaderWrite:: Range {
108100 /** Gets the (lower-case) name of a header set by this definition. */
109- string getHeaderName ( ) { result = self .getHeaderName ( ) }
101+ string getHeaderName ( ) { result = super .getHeaderName ( ) }
110102
111103 /** Gets the value of the header set by this definition. */
112- string getHeaderValue ( ) { result = self .getHeaderValue ( ) }
104+ string getHeaderValue ( ) { result = super .getHeaderValue ( ) }
113105
114106 /** Holds if this header write defines the header `header`. */
115- predicate definesHeader ( string header , string value ) { self .definesHeader ( header , value ) }
107+ predicate definesHeader ( string header , string value ) { super .definesHeader ( header , value ) }
116108
117109 /**
118110 * Gets the node representing the name of the header defined by this write.
@@ -121,13 +113,13 @@ module HTTP {
121113 * sets the `Content-Type` header) may not have such a node, so callers should use
122114 * `getHeaderName` in preference to this method).
123115 */
124- DataFlow:: Node getName ( ) { result = self .getName ( ) }
116+ DataFlow:: Node getName ( ) { result = super .getName ( ) }
125117
126118 /** Gets the node representing the value of the header defined by this write. */
127- DataFlow:: Node getValue ( ) { result = self .getValue ( ) }
119+ DataFlow:: Node getValue ( ) { result = super .getValue ( ) }
128120
129121 /** Gets the response writer associated with this header write, if any. */
130- ResponseWriter getResponseWriter ( ) { result = self .getResponseWriter ( ) }
122+ ResponseWriter getResponseWriter ( ) { result = super .getResponseWriter ( ) }
131123 }
132124
133125 /** A data-flow node whose value is written to an HTTP header. */
@@ -171,11 +163,7 @@ module HTTP {
171163 * Extend this class to refine existing API models. If you want to model new APIs,
172164 * extend `HTTP::RequestBody::Range` instead.
173165 */
174- class RequestBody extends DataFlow:: Node {
175- RequestBody:: Range self ;
176-
177- RequestBody ( ) { this = self }
178- }
166+ class RequestBody extends DataFlow:: Node instanceof RequestBody:: Range { }
179167
180168 /** Provides a class for modeling new HTTP response-body APIs. */
181169 module ResponseBody {
@@ -215,19 +203,15 @@ module HTTP {
215203 * Extend this class to refine existing API models. If you want to model new APIs,
216204 * extend `HTTP::ResponseBody::Range` instead.
217205 */
218- class ResponseBody extends DataFlow:: Node {
219- ResponseBody:: Range self ;
220-
221- ResponseBody ( ) { this = self }
222-
206+ class ResponseBody extends DataFlow:: Node instanceof ResponseBody:: Range {
223207 /** Gets the response writer associated with this header write, if any. */
224- ResponseWriter getResponseWriter ( ) { result = self .getResponseWriter ( ) }
208+ ResponseWriter getResponseWriter ( ) { result = super .getResponseWriter ( ) }
225209
226210 /** Gets a content-type associated with this body. */
227- string getAContentType ( ) { result = self .getAContentType ( ) }
211+ string getAContentType ( ) { result = super .getAContentType ( ) }
228212
229213 /** Gets a dataflow node for a content-type associated with this body. */
230- DataFlow:: Node getAContentTypeNode ( ) { result = self .getAContentTypeNode ( ) }
214+ DataFlow:: Node getAContentTypeNode ( ) { result = super .getAContentTypeNode ( ) }
231215 }
232216
233217 /** Provides a class for modeling new HTTP template response-body APIs. */
@@ -250,13 +234,9 @@ module HTTP {
250234 * Extend this class to refine existing API models. If you want to model new APIs,
251235 * extend `HTTP::TemplateResponseBody::Range` instead.
252236 */
253- class TemplateResponseBody extends ResponseBody {
254- override TemplateResponseBody:: Range self ;
255-
256- TemplateResponseBody ( ) { this = self }
257-
237+ class TemplateResponseBody extends ResponseBody instanceof TemplateResponseBody:: Range {
258238 /** Gets the read of the variable inside the template where this value is read. */
259- HtmlTemplate:: TemplateRead getRead ( ) { result = self .getRead ( ) }
239+ HtmlTemplate:: TemplateRead getRead ( ) { result = super .getRead ( ) }
260240 }
261241
262242 /** Provides a class for modeling new HTTP client request APIs. */
@@ -285,15 +265,11 @@ module HTTP {
285265 * Extend this class to refine existing API models. If you want to model new APIs,
286266 * extend `HTTP::ClientRequest::Range` instead.
287267 */
288- class ClientRequest extends DataFlow:: Node {
289- ClientRequest:: Range self ;
290-
291- ClientRequest ( ) { this = self }
292-
268+ class ClientRequest extends DataFlow:: Node instanceof ClientRequest:: Range {
293269 /**
294270 * Gets the URL of the request.
295271 */
296- DataFlow:: Node getUrl ( ) { result = self .getUrl ( ) }
272+ DataFlow:: Node getUrl ( ) { result = super .getUrl ( ) }
297273 }
298274
299275 /** Provides a class for modeling new HTTP redirect APIs. */
@@ -337,16 +313,12 @@ module HTTP {
337313 * Extend this class to refine existing API models. If you want to model new APIs,
338314 * extend `HTTP::Redirect::Range` instead.
339315 */
340- class Redirect extends DataFlow:: Node {
341- Redirect:: Range self ;
342-
343- Redirect ( ) { this = self }
344-
316+ class Redirect extends DataFlow:: Node instanceof Redirect:: Range {
345317 /** Gets the data-flow node representing the URL being redirected to. */
346- DataFlow:: Node getUrl ( ) { result = self .getUrl ( ) }
318+ DataFlow:: Node getUrl ( ) { result = super .getUrl ( ) }
347319
348320 /** Gets the response writer that this redirect is sent on, if any. */
349- ResponseWriter getResponseWriter ( ) { result = self .getResponseWriter ( ) }
321+ ResponseWriter getResponseWriter ( ) { result = super .getResponseWriter ( ) }
350322 }
351323
352324 /** Provides a class for modeling new HTTP handler APIs. */
@@ -369,12 +341,8 @@ module HTTP {
369341 * Extend this class to refine existing API models. If you want to model new APIs,
370342 * extend `HTTP::RequestHandler::Range` instead.
371343 */
372- class RequestHandler extends DataFlow:: Node {
373- RequestHandler:: Range self ;
374-
375- RequestHandler ( ) { this = self }
376-
344+ class RequestHandler extends DataFlow:: Node instanceof RequestHandler:: Range {
377345 /** Gets a node that is used in a check that is tested before this handler is run. */
378- predicate guardedBy ( DataFlow:: Node check ) { self .guardedBy ( check ) }
346+ predicate guardedBy ( DataFlow:: Node check ) { super .guardedBy ( check ) }
379347 }
380348}
0 commit comments