@@ -44,7 +44,7 @@ newtype TApplicationModeEndpoint =
44
44
abstract private class ApplicationModeEndpoint extends TApplicationModeEndpoint {
45
45
abstract Call getCall ( ) ;
46
46
47
- abstract int getArgIndex ( ) ;
47
+ abstract string getMaDInput ( ) ;
48
48
49
49
abstract Top asTop ( ) ;
50
50
@@ -66,7 +66,11 @@ class ExplicitArgument extends ApplicationModeEndpoint, TExplicitArgument {
66
66
67
67
override Call getCall ( ) { result = call }
68
68
69
- override int getArgIndex ( ) { this .asTop ( ) = call .getArgument ( result ) }
69
+ private int getArgIndex ( ) { this .asTop ( ) = call .getArgument ( result ) }
70
+
71
+ override string getMaDInput ( ) {
72
+ result = "Argument[" + this .getArgIndex ( ) + "]"
73
+ }
70
74
71
75
override Top asTop ( ) { result = arg .asExpr ( ) }
72
76
@@ -85,7 +89,7 @@ class InstanceArgument extends ApplicationModeEndpoint, TInstanceArgument {
85
89
86
90
override Call getCall ( ) { result = call }
87
91
88
- override int getArgIndex ( ) { result = - 1 }
92
+ override string getMaDInput ( ) { result = "Argument[this]" }
89
93
90
94
override Top asTop ( ) { if exists ( arg .asExpr ( ) ) then result = arg .asExpr ( ) else result = call }
91
95
@@ -114,7 +118,9 @@ class ImplicitVarargsArray extends ApplicationModeEndpoint, TImplicitVarargsArra
114
118
115
119
override Call getCall ( ) { result = call }
116
120
117
- override int getArgIndex ( ) { result = idx }
121
+ override string getMaDInput ( ) {
122
+ result = "Argument[" + idx + "]"
123
+ }
118
124
119
125
override Top asTop ( ) { result = this .getCall ( ) }
120
126
@@ -135,7 +141,7 @@ class MethodCall extends ApplicationModeEndpoint, TMethodCall {
135
141
136
142
override Call getCall ( ) { result = call }
137
143
138
- override int getArgIndex ( ) { result = - 1 }
144
+ override string getMaDInput ( ) { result = "Argument[this]" }
139
145
140
146
override Top asTop ( ) { result = call }
141
147
@@ -208,7 +214,7 @@ module ApplicationCandidatesImpl implements SharedCharacteristics::CandidateSig
208
214
ApplicationModeGetCallable:: getCallable ( e ) .hasQualifiedName ( package , type , name ) and
209
215
signature = ExternalFlow:: paramsString ( ApplicationModeGetCallable:: getCallable ( e ) ) and
210
216
ext = "" and
211
- input = AutomodelJavaUtil :: getArgumentForIndex ( e . getArgIndex ( ) )
217
+ input = e . getMaDInput ( )
212
218
}
213
219
214
220
/**
@@ -267,7 +273,7 @@ class ApplicationModeMetadataExtractor extends string {
267
273
) {
268
274
exists ( Callable callable |
269
275
e .getCall ( ) .getCallee ( ) = callable and
270
- input = AutomodelJavaUtil :: getArgumentForIndex ( e . getArgIndex ( ) ) and
276
+ input = e . getMaDInput ( ) and
271
277
package = callable .getDeclaringType ( ) .getPackage ( ) .getName ( ) and
272
278
// we're using the erased types because the MaD convention is to not specify type parameters.
273
279
// Whether something is or isn't a sink doesn't usually depend on the type parameters.
0 commit comments