@@ -19,32 +19,30 @@ module Twirp {
19
19
class ServiceInstantiation extends DataFlow:: CallNode {
20
20
ServiceInstantiation ( ) {
21
21
this =
22
- API:: getTopLevelMember ( "Twirp" ) .getMember ( "Service" ) .getASubclass * ( ) .getAnInstantiation ( )
22
+ API:: getTopLevelMember ( "Twirp" ) .getMember ( "Service" ) .getASubclass ( ) .getAnInstantiation ( )
23
23
}
24
24
25
25
/**
26
26
* Gets a local source node for the Service instantiation argument (the service handler).
27
27
*/
28
- DataFlow:: LocalSourceNode getHandlerSource ( ) { result = this .getArgument ( 0 ) .getALocalSource ( ) }
28
+ private DataFlow:: LocalSourceNode getHandlerSource ( ) {
29
+ result = this .getArgument ( 0 ) .getALocalSource ( )
30
+ }
29
31
30
32
/**
31
33
* Gets the API::Node for the service handler's class.
32
34
*/
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 ( )
40
37
}
41
38
42
39
/**
43
40
* Gets the AST module for the service handler's class.
44
41
*/
45
- Ast:: Module getHandlerClassAstNode ( ) {
42
+ private Ast:: Module getAHandlerClassAstNode ( ) {
46
43
result =
47
- this .getHandlerClassDataFlowNode ( )
44
+ this .getAHandlerClassApiNode ( )
45
+ .asSource ( )
48
46
.asExpr ( )
49
47
.( CfgNodes:: ExprNodes:: ConstantReadAccessCfgNode )
50
48
.getExpr ( )
@@ -54,16 +52,17 @@ module Twirp {
54
52
/**
55
53
* Gets a handler's method.
56
54
*/
57
- Ast:: Method getHandlerMethod ( ) { result = this .getHandlerClassAstNode ( ) .getAnInstanceMethod ( ) }
55
+ Ast:: Method getAHandlerMethod ( ) {
56
+ result = this .getAHandlerClassAstNode ( ) .getAnInstanceMethod ( )
57
+ }
58
58
}
59
59
60
60
/**
61
61
* A Twirp client
62
62
*/
63
63
class ClientInstantiation extends DataFlow:: CallNode {
64
64
ClientInstantiation ( ) {
65
- this =
66
- API:: getTopLevelMember ( "Twirp" ) .getMember ( "Client" ) .getASubclass * ( ) .getAnInstantiation ( )
65
+ this = API:: getTopLevelMember ( "Twirp" ) .getMember ( "Client" ) .getASubclass ( ) .getAnInstantiation ( )
67
66
}
68
67
}
69
68
@@ -76,7 +75,7 @@ module Twirp {
76
75
class UnmarshaledParameter extends Http:: Server:: RequestInputAccess:: Range ,
77
76
DataFlow:: ParameterNode {
78
77
UnmarshaledParameter ( ) {
79
- exists ( ServiceInstantiation i | i .getHandlerMethod ( ) .getParameter ( 0 ) = this .asParameter ( ) )
78
+ exists ( ServiceInstantiation i | i .getAHandlerMethod ( ) .getParameter ( 0 ) = this .asParameter ( ) )
80
79
}
81
80
82
81
override string getSourceType ( ) { result = "Twirp Unmarhaled Parameter" }
0 commit comments