@@ -285,7 +285,7 @@ module Routing {
285285 }
286286
287287 /**
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 ,
289289 * from any route handler that follows after this one.
290290 *
291291 * For example, in the context of Express, the `app` object is available as `req.app`:
@@ -774,20 +774,16 @@ module Routing {
774774 /**
775775 * Gets the `i`th parameter of this route handler.
776776 *
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()`.
780778 */
781- final RouteHandlerInput getInput ( int n ) { result = function .getParameter ( n ) }
779+ final RouteHandlerParameter getParameter ( int n ) { result = function .getParameter ( n ) }
782780
783781 /**
784782 * Gets a parameter of this route handler.
785783 *
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()`.
789785 */
790- final RouteHandlerInput getAnInput ( ) { result = function .getAParameter ( ) }
786+ final RouteHandlerParameter getAParameter ( ) { result = function .getAParameter ( ) }
791787
792788 /** Gets the function implementing this route handler. */
793789 DataFlow:: FunctionNode getFunction ( ) { result = function }
@@ -802,11 +798,11 @@ module Routing {
802798 * if the default behavior is inadequate for that framework.
803799 */
804800 DataFlow:: CallNode getAContinuationInvocation ( ) {
805- result = getAnInput ( ) .ref ( ) .getAnInvocation ( ) and
801+ result = getAParameter ( ) .ref ( ) .getAnInvocation ( ) and
806802 result .getNumArgument ( ) = 0
807803 or
808804 result .( DataFlow:: MethodCallNode ) .getMethodName ( ) = "then" and
809- result .getArgument ( 0 ) = getAnInput ( ) .ref ( ) .getALocalUse ( )
805+ result .getArgument ( 0 ) = getAParameter ( ) .ref ( ) .getALocalUse ( )
810806 }
811807 }
812808
@@ -820,18 +816,18 @@ module Routing {
820816 /**
821817 * A parameter to a route handler function.
822818 */
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 ( ) }
825821
826- /** Gets a data flow node referring to this route handler input . */
822+ /** Gets a data flow node referring to this route handler parameter . */
827823 private DataFlow:: SourceNode ref ( DataFlow:: TypeTracker t ) {
828824 t .start ( ) and
829825 result = this
830826 or
831827 exists ( DataFlow:: TypeTracker t2 | result = ref ( t2 ) .track ( t2 , t ) )
832828 }
833829
834- /** Gets a data flow node referring to this route handler input . */
830+ /** Gets a data flow node referring to this route handler parameter . */
835831 DataFlow:: SourceNode ref ( ) { result = ref ( DataFlow:: TypeTracker:: end ( ) ) }
836832
837833 /**
@@ -840,7 +836,7 @@ module Routing {
840836 final RouteHandler getRouteHandler ( ) { result .getFunction ( ) .getAParameter ( ) = this }
841837
842838 /**
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
844840 * during execution of this router handler, or in one of the preceding ones.
845841 */
846842 pragma [ inline]
@@ -854,7 +850,7 @@ module Routing {
854850 }
855851
856852 /**
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`.
858854 *
859855 * For example,
860856 * ```js
@@ -874,7 +870,7 @@ module Routing {
874870 private DataFlow:: Node getAnAccessPathRhs ( Node base , int n , string path ) {
875871 // Assigned in the body of a route handler function, whi
876872 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
878874 exists ( handler .getAContinuationInvocation ( ) )
879875 )
880876 or
@@ -890,7 +886,7 @@ module Routing {
890886 }
891887
892888 /**
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`.
894890 *
895891 * For example,
896892 * ```js
@@ -902,7 +898,7 @@ module Routing {
902898 * of `handler2`.
903899 */
904900 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
906902 not AccessPath:: DominatingPaths:: hasDominatingWrite ( result )
907903 }
908904
0 commit comments