@@ -61,17 +61,15 @@ class ParameterNode extends DataFlow::SourceNode {
61
61
* new Array(16)
62
62
* ```
63
63
*/
64
- class InvokeNode extends DataFlow:: SourceNode {
65
- InvokeNode ( ) { this instanceof DataFlow:: Impl:: InvokeNodeDef }
66
-
64
+ class InvokeNode extends DataFlow:: SourceNode instanceof DataFlow:: Impl:: InvokeNodeDef {
67
65
/** Gets the syntactic invoke expression underlying this function invocation. */
68
- InvokeExpr getInvokeExpr ( ) { result = this . ( DataFlow :: Impl :: InvokeNodeDef ) .getInvokeExpr ( ) }
66
+ InvokeExpr getInvokeExpr ( ) { result = super .getInvokeExpr ( ) }
69
67
70
68
/** Gets the name of the function or method being invoked, if it can be determined. */
71
- string getCalleeName ( ) { result = this . ( DataFlow :: Impl :: InvokeNodeDef ) .getCalleeName ( ) }
69
+ string getCalleeName ( ) { result = super .getCalleeName ( ) }
72
70
73
71
/** Gets the data flow node specifying the function to be called. */
74
- DataFlow:: Node getCalleeNode ( ) { result = this . ( DataFlow :: Impl :: InvokeNodeDef ) .getCalleeNode ( ) }
72
+ DataFlow:: Node getCalleeNode ( ) { result = super .getCalleeNode ( ) }
75
73
76
74
/**
77
75
* Gets the data flow node corresponding to the `i`th argument of this invocation.
@@ -92,10 +90,10 @@ class InvokeNode extends DataFlow::SourceNode {
92
90
* but the position of `z` cannot be determined, hence there are no first and second
93
91
* argument nodes.
94
92
*/
95
- DataFlow:: Node getArgument ( int i ) { result = this . ( DataFlow :: Impl :: InvokeNodeDef ) .getArgument ( i ) }
93
+ DataFlow:: Node getArgument ( int i ) { result = super .getArgument ( i ) }
96
94
97
95
/** Gets the data flow node corresponding to an argument of this invocation. */
98
- DataFlow:: Node getAnArgument ( ) { result = this . ( DataFlow :: Impl :: InvokeNodeDef ) .getAnArgument ( ) }
96
+ DataFlow:: Node getAnArgument ( ) { result = super .getAnArgument ( ) }
99
97
100
98
/** Gets the data flow node corresponding to the last argument of this invocation. */
101
99
DataFlow:: Node getLastArgument ( ) { result = getArgument ( getNumArgument ( ) - 1 ) }
@@ -112,12 +110,10 @@ class InvokeNode extends DataFlow::SourceNode {
112
110
* ```
113
111
* .
114
112
*/
115
- DataFlow:: Node getASpreadArgument ( ) {
116
- result = this .( DataFlow:: Impl:: InvokeNodeDef ) .getASpreadArgument ( )
117
- }
113
+ DataFlow:: Node getASpreadArgument ( ) { result = super .getASpreadArgument ( ) }
118
114
119
115
/** Gets the number of arguments of this invocation, if it can be determined. */
120
- int getNumArgument ( ) { result = this . ( DataFlow :: Impl :: InvokeNodeDef ) .getNumArgument ( ) }
116
+ int getNumArgument ( ) { result = super .getNumArgument ( ) }
121
117
122
118
Function getEnclosingFunction ( ) { result = getBasicBlock ( ) .getContainer ( ) }
123
119
@@ -258,15 +254,13 @@ class InvokeNode extends DataFlow::SourceNode {
258
254
* Math.abs(x)
259
255
* ```
260
256
*/
261
- class CallNode extends InvokeNode {
262
- CallNode ( ) { this instanceof DataFlow:: Impl:: CallNodeDef }
263
-
257
+ class CallNode extends InvokeNode instanceof DataFlow:: Impl:: CallNodeDef {
264
258
/**
265
259
* Gets the data flow node corresponding to the receiver expression of this method call.
266
260
*
267
261
* For example, the receiver of `x.m()` is `x`.
268
262
*/
269
- DataFlow:: Node getReceiver ( ) { result = this . ( DataFlow :: Impl :: CallNodeDef ) .getReceiver ( ) }
263
+ DataFlow:: Node getReceiver ( ) { result = super .getReceiver ( ) }
270
264
}
271
265
272
266
/**
@@ -279,11 +273,9 @@ class CallNode extends InvokeNode {
279
273
* Math.abs(x)
280
274
* ```
281
275
*/
282
- class MethodCallNode extends CallNode {
283
- MethodCallNode ( ) { this instanceof DataFlow:: Impl:: MethodCallNodeDef }
284
-
276
+ class MethodCallNode extends CallNode instanceof DataFlow:: Impl:: MethodCallNodeDef {
285
277
/** Gets the name of the invoked method, if it can be determined. */
286
- string getMethodName ( ) { result = this . ( DataFlow :: Impl :: MethodCallNodeDef ) .getMethodName ( ) }
278
+ string getMethodName ( ) { result = super .getMethodName ( ) }
287
279
288
280
/**
289
281
* Holds if this data flow node calls method `methodName` on receiver node `receiver`.
0 commit comments