Package org.openrewrite.java.trait
Class VariableAccess
java.lang.Object
org.openrewrite.java.trait.VariableAccess
- All Implemented Interfaces:
org.openrewrite.trait.Trait<org.openrewrite.java.tree.J.Identifier>
@Incubating(since="8.30.0")
public class VariableAccess
extends Object
implements org.openrewrite.trait.Trait<org.openrewrite.java.tree.J.Identifier>
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanA read access to a variable.booleanA write access to a variable occurs as the destination of an assignment.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openrewrite.trait.Trait
getCursor, getTree
-
Constructor Details
-
VariableAccess
public VariableAccess()
-
-
Method Details
-
isWriteAccess
public boolean isWriteAccess()A write access to a variable occurs as the destination of an assignment. -
isReadAccess
public boolean isReadAccess()A read access to a variable. In other words, it is a variable access that does _not_ occur as the destination of a simple assignment, but it may occur as the destination of a compound assignment or a unary assignment.
-