Package org.openrewrite.staticanalysis
Class VariableReferences
java.lang.Object
org.openrewrite.staticanalysis.VariableReferences
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<org.openrewrite.java.tree.Statement> findLhsReferences(org.openrewrite.java.tree.J j, org.openrewrite.java.tree.J.Identifier target) static List<org.openrewrite.java.tree.J> findRhsReferences(org.openrewrite.java.tree.J j, org.openrewrite.java.tree.J.Identifier target) An identifier is considered a right-hand side ("rhs") read operation if it is not used as the left operand of an assignment, nor as the operand of a stand-alone increment.
-
Constructor Details
-
VariableReferences
public VariableReferences()
-
-
Method Details
-
findRhsReferences
public static List<org.openrewrite.java.tree.J> findRhsReferences(org.openrewrite.java.tree.J j, org.openrewrite.java.tree.J.Identifier target) An identifier is considered a right-hand side ("rhs") read operation if it is not used as the left operand of an assignment, nor as the operand of a stand-alone increment.- Parameters:
j- The subtree to search.target- AJ.Identifierto check for usages.- Returns:
- found
Jlocations of "right-hand" read calls.
-
findLhsReferences
public static List<org.openrewrite.java.tree.Statement> findLhsReferences(org.openrewrite.java.tree.J j, org.openrewrite.java.tree.J.Identifier target) - Parameters:
j- The subtree to search.target- AJ.Identifierto check for usages.- Returns:
- found
Statementlocations of "left-hand" assignment write calls.
-