@@ -285,7 +285,7 @@ module Routing {
285
285
}
286
286
287
287
/**
288
- * Gets a node whose value can be accessed via the given access path on `n`th route handler input ,
288
+ * Gets a node whose value can be accessed via the given access path on the `n`th route handler parameter ,
289
289
* from any route handler that follows after this one.
290
290
*
291
291
* For example, in the context of Express, the `app` object is available as `req.app`:
@@ -774,20 +774,16 @@ module Routing {
774
774
/**
775
775
* Gets the `i`th parameter of this route handler.
776
776
*
777
- * This is equivalent to `getParameter(i)` but returns a `RouteHandlerInput`.
778
- *
779
- * To find all references to this parameter, use `getInput(n).ref()`.
777
+ * To find all references to this parameter, use `getParameter(n).ref()`.
780
778
*/
781
- final RouteHandlerInput getInput ( int n ) { result = function .getParameter ( n ) }
779
+ final RouteHandlerParameter getParameter ( int n ) { result = function .getParameter ( n ) }
782
780
783
781
/**
784
782
* Gets a parameter of this route handler.
785
783
*
786
- * This is equivalent to `getAParameter()` but returns a `RouteHandlerInput`.
787
- *
788
- * To find all references to a parameter, use `getAnInput().ref()`.
784
+ * To find all references to a parameter, use `getAParameter().ref()`.
789
785
*/
790
- final RouteHandlerInput getAnInput ( ) { result = function .getAParameter ( ) }
786
+ final RouteHandlerParameter getAParameter ( ) { result = function .getAParameter ( ) }
791
787
792
788
/** Gets the function implementing this route handler. */
793
789
DataFlow:: FunctionNode getFunction ( ) { result = function }
@@ -802,11 +798,11 @@ module Routing {
802
798
* if the default behavior is inadequate for that framework.
803
799
*/
804
800
DataFlow:: CallNode getAContinuationInvocation ( ) {
805
- result = getAnInput ( ) .ref ( ) .getAnInvocation ( ) and
801
+ result = getAParameter ( ) .ref ( ) .getAnInvocation ( ) and
806
802
result .getNumArgument ( ) = 0
807
803
or
808
804
result .( DataFlow:: MethodCallNode ) .getMethodName ( ) = "then" and
809
- result .getArgument ( 0 ) = getAnInput ( ) .ref ( ) .getALocalUse ( )
805
+ result .getArgument ( 0 ) = getAParameter ( ) .ref ( ) .getALocalUse ( )
810
806
}
811
807
}
812
808
@@ -820,18 +816,18 @@ module Routing {
820
816
/**
821
817
* A parameter to a route handler function.
822
818
*/
823
- class RouteHandlerInput extends DataFlow:: ParameterNode {
824
- RouteHandlerInput ( ) { this = any ( RouteHandler h ) .getFunction ( ) .getAParameter ( ) }
819
+ class RouteHandlerParameter extends DataFlow:: ParameterNode {
820
+ RouteHandlerParameter ( ) { this = any ( RouteHandler h ) .getFunction ( ) .getAParameter ( ) }
825
821
826
- /** Gets a data flow node referring to this route handler input . */
822
+ /** Gets a data flow node referring to this route handler parameter . */
827
823
private DataFlow:: SourceNode ref ( DataFlow:: TypeTracker t ) {
828
824
t .start ( ) and
829
825
result = this
830
826
or
831
827
exists ( DataFlow:: TypeTracker t2 | result = ref ( t2 ) .track ( t2 , t ) )
832
828
}
833
829
834
- /** Gets a data flow node referring to this route handler input . */
830
+ /** Gets a data flow node referring to this route handler parameter . */
835
831
DataFlow:: SourceNode ref ( ) { result = ref ( DataFlow:: TypeTracker:: end ( ) ) }
836
832
837
833
/**
@@ -840,7 +836,7 @@ module Routing {
840
836
final RouteHandler getRouteHandler ( ) { result .getFunction ( ) .getAParameter ( ) = this }
841
837
842
838
/**
843
- * Gets a node that is stored in the given access path on this route handler input , either
839
+ * Gets a node that is stored in the given access path on this route handler parameter , either
844
840
* during execution of this router handler, or in one of the preceding ones.
845
841
*/
846
842
pragma [ inline]
@@ -854,7 +850,7 @@ module Routing {
854
850
}
855
851
856
852
/**
857
- * Gets a value that flows into the given access path of the `n`th route handler input at `base`.
853
+ * Gets a value that flows into the given access path of the `n`th route handler parameter of `base`.
858
854
*
859
855
* For example,
860
856
* ```js
@@ -874,7 +870,7 @@ module Routing {
874
870
private DataFlow:: Node getAnAccessPathRhs ( Node base , int n , string path ) {
875
871
// Assigned in the body of a route handler function, whi
876
872
exists ( RouteHandler handler | base = handler |
877
- result = AccessPath:: getAnAssignmentTo ( handler .getInput ( n ) .ref ( ) , path ) and
873
+ result = AccessPath:: getAnAssignmentTo ( handler .getParameter ( n ) .ref ( ) , path ) and
878
874
exists ( handler .getAContinuationInvocation ( ) )
879
875
)
880
876
or
@@ -890,7 +886,7 @@ module Routing {
890
886
}
891
887
892
888
/**
893
- * Gets a value that refers to the given access path of the `n`th route handler input at `base`
889
+ * Gets a value that refers to the given access path of the `n`th route handler parameter of `base`.
894
890
*
895
891
* For example,
896
892
* ```js
@@ -902,7 +898,7 @@ module Routing {
902
898
* of `handler2`.
903
899
*/
904
900
private DataFlow:: SourceNode getAnAccessPathRead ( RouteHandler base , int n , string path ) {
905
- result = AccessPath:: getAReferenceTo ( base .getInput ( n ) .ref ( ) , path ) and
901
+ result = AccessPath:: getAReferenceTo ( base .getParameter ( n ) .ref ( ) , path ) and
906
902
not AccessPath:: DominatingPaths:: hasDominatingWrite ( result )
907
903
}
908
904
0 commit comments