@@ -21,6 +21,7 @@ private RefType boxIfNeeded(J::Type t) {
21
21
result = t
22
22
}
23
23
24
+ /** Provides the input types and predicates for instantiation of `UniversalFlow`. */
24
25
module FlowStepsInput implements UniversalFlow:: UniversalFlowInput< Location > {
25
26
private newtype TFlowNode =
26
27
TField ( Field f ) { not f .getType ( ) instanceof PrimitiveType } or
@@ -32,28 +33,35 @@ module FlowStepsInput implements UniversalFlow::UniversalFlowInput<Location> {
32
33
* A `Field`, `BaseSsaVariable`, `Expr`, or `Method`.
33
34
*/
34
35
class FlowNode extends TFlowNode {
36
+ /** Gets a textual representation of this element. */
35
37
string toString ( ) {
36
38
result = this .asField ( ) .toString ( ) or
37
39
result = this .asSsa ( ) .toString ( ) or
38
40
result = this .asExpr ( ) .toString ( ) or
39
41
result = this .asMethod ( ) .toString ( )
40
42
}
41
43
44
+ /** Gets the source location for this element. */
42
45
Location getLocation ( ) {
43
46
result = this .asField ( ) .getLocation ( ) or
44
47
result = this .asSsa ( ) .getLocation ( ) or
45
48
result = this .asExpr ( ) .getLocation ( ) or
46
49
result = this .asMethod ( ) .getLocation ( )
47
50
}
48
51
52
+ /** Gets the field corresponding to this node, if any. */
49
53
Field asField ( ) { this = TField ( result ) }
50
54
55
+ /** Gets the SSA variable corresponding to this node, if any. */
51
56
BaseSsaVariable asSsa ( ) { this = TSsa ( result ) }
52
57
58
+ /** Gets the expression corresponding to this node, if any. */
53
59
Expr asExpr ( ) { this = TExpr ( result ) }
54
60
61
+ /** Gets the method corresponding to this node, if any. */
55
62
Method asMethod ( ) { this = TMethod ( result ) }
56
63
64
+ /** Gets the type of this node. */
57
65
RefType getType ( ) {
58
66
result = this .asField ( ) .getType ( ) or
59
67
result = this .asSsa ( ) .getSourceVariable ( ) .getType ( ) or
0 commit comments