@@ -21,6 +21,7 @@ private RefType boxIfNeeded(J::Type t) {
2121 result = t
2222}
2323
24+ /** Provides the input types and predicates for instantiation of `UniversalFlow`. */
2425module FlowStepsInput implements UniversalFlow:: UniversalFlowInput< Location > {
2526 private newtype TFlowNode =
2627 TField ( Field f ) { not f .getType ( ) instanceof PrimitiveType } or
@@ -32,28 +33,35 @@ module FlowStepsInput implements UniversalFlow::UniversalFlowInput<Location> {
3233 * A `Field`, `BaseSsaVariable`, `Expr`, or `Method`.
3334 */
3435 class FlowNode extends TFlowNode {
36+ /** Gets a textual representation of this element. */
3537 string toString ( ) {
3638 result = this .asField ( ) .toString ( ) or
3739 result = this .asSsa ( ) .toString ( ) or
3840 result = this .asExpr ( ) .toString ( ) or
3941 result = this .asMethod ( ) .toString ( )
4042 }
4143
44+ /** Gets the source location for this element. */
4245 Location getLocation ( ) {
4346 result = this .asField ( ) .getLocation ( ) or
4447 result = this .asSsa ( ) .getLocation ( ) or
4548 result = this .asExpr ( ) .getLocation ( ) or
4649 result = this .asMethod ( ) .getLocation ( )
4750 }
4851
52+ /** Gets the field corresponding to this node, if any. */
4953 Field asField ( ) { this = TField ( result ) }
5054
55+ /** Gets the SSA variable corresponding to this node, if any. */
5156 BaseSsaVariable asSsa ( ) { this = TSsa ( result ) }
5257
58+ /** Gets the expression corresponding to this node, if any. */
5359 Expr asExpr ( ) { this = TExpr ( result ) }
5460
61+ /** Gets the method corresponding to this node, if any. */
5562 Method asMethod ( ) { this = TMethod ( result ) }
5663
64+ /** Gets the type of this node. */
5765 RefType getType ( ) {
5866 result = this .asField ( ) .getType ( ) or
5967 result = this .asSsa ( ) .getSourceVariable ( ) .getType ( ) or
0 commit comments