@@ -19,32 +19,30 @@ module Twirp {
1919 class ServiceInstantiation extends DataFlow:: CallNode {
2020 ServiceInstantiation ( ) {
2121 this =
22- API:: getTopLevelMember ( "Twirp" ) .getMember ( "Service" ) .getASubclass * ( ) .getAnInstantiation ( )
22+ API:: getTopLevelMember ( "Twirp" ) .getMember ( "Service" ) .getASubclass ( ) .getAnInstantiation ( )
2323 }
2424
2525 /**
2626 * Gets a local source node for the Service instantiation argument (the service handler).
2727 */
28- DataFlow:: LocalSourceNode getHandlerSource ( ) { result = this .getArgument ( 0 ) .getALocalSource ( ) }
28+ private DataFlow:: LocalSourceNode getHandlerSource ( ) {
29+ result = this .getArgument ( 0 ) .getALocalSource ( )
30+ }
2931
3032 /**
3133 * Gets the API::Node for the service handler's class.
3234 */
33- API:: Node getHandlerClassApiNode ( ) { result .getAnInstantiation ( ) = this .getHandlerSource ( ) }
34-
35- /**
36- * Gets the local source node for the service handler's class.
37- */
38- DataFlow:: LocalSourceNode getHandlerClassDataFlowNode ( ) {
39- result = this .getHandlerClassApiNode ( ) .asSource ( )
35+ private API:: Node getAHandlerClassApiNode ( ) {
36+ result .getAnInstantiation ( ) = this .getHandlerSource ( )
4037 }
4138
4239 /**
4340 * Gets the AST module for the service handler's class.
4441 */
45- Ast:: Module getHandlerClassAstNode ( ) {
42+ private Ast:: Module getAHandlerClassAstNode ( ) {
4643 result =
47- this .getHandlerClassDataFlowNode ( )
44+ this .getAHandlerClassApiNode ( )
45+ .asSource ( )
4846 .asExpr ( )
4947 .( CfgNodes:: ExprNodes:: ConstantReadAccessCfgNode )
5048 .getExpr ( )
@@ -54,16 +52,17 @@ module Twirp {
5452 /**
5553 * Gets a handler's method.
5654 */
57- Ast:: Method getHandlerMethod ( ) { result = this .getHandlerClassAstNode ( ) .getAnInstanceMethod ( ) }
55+ Ast:: Method getAHandlerMethod ( ) {
56+ result = this .getAHandlerClassAstNode ( ) .getAnInstanceMethod ( )
57+ }
5858 }
5959
6060 /**
6161 * A Twirp client
6262 */
6363 class ClientInstantiation extends DataFlow:: CallNode {
6464 ClientInstantiation ( ) {
65- this =
66- API:: getTopLevelMember ( "Twirp" ) .getMember ( "Client" ) .getASubclass * ( ) .getAnInstantiation ( )
65+ this = API:: getTopLevelMember ( "Twirp" ) .getMember ( "Client" ) .getASubclass ( ) .getAnInstantiation ( )
6766 }
6867 }
6968
@@ -76,7 +75,7 @@ module Twirp {
7675 class UnmarshaledParameter extends Http:: Server:: RequestInputAccess:: Range ,
7776 DataFlow:: ParameterNode {
7877 UnmarshaledParameter ( ) {
79- exists ( ServiceInstantiation i | i .getHandlerMethod ( ) .getParameter ( 0 ) = this .asParameter ( ) )
78+ exists ( ServiceInstantiation i | i .getAHandlerMethod ( ) .getParameter ( 0 ) = this .asParameter ( ) )
8079 }
8180
8281 override string getSourceType ( ) { result = "Twirp Unmarhaled Parameter" }
0 commit comments