Package org.openrewrite.java.trait
Class VariableAccess.Matcher
java.lang.Object
org.openrewrite.trait.SimpleTraitMatcher<VariableAccess>
org.openrewrite.java.trait.VariableAccess.Matcher
- All Implemented Interfaces:
org.openrewrite.trait.TraitMatcher<VariableAccess>
- Enclosing class:
VariableAccess
public static class VariableAccess.Matcher
extends org.openrewrite.trait.SimpleTraitMatcher<VariableAccess>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<P> org.openrewrite.TreeVisitor<? extends org.openrewrite.Tree, P> asVisitor(org.openrewrite.trait.VisitFunction2<VariableAccess, P> visitor) higher(org.openrewrite.Cursor cursor) Since variable access is a trait of a leaf LST element (J.Identifier), there are no higher elements in the tree that could potentially match.isOfClassType(String fullyQualifiedName) protected @Nullable VariableAccesstest(org.openrewrite.Cursor cursor) Methods inherited from class org.openrewrite.trait.SimpleTraitMatcher
get, lowerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openrewrite.trait.TraitMatcher
asVisitor, get, lower, require, require
-
Constructor Details
-
Matcher
public Matcher()
-
-
Method Details
-
isOfType
-
isOfClassType
-
asVisitor
public <P> org.openrewrite.TreeVisitor<? extends org.openrewrite.Tree,P> asVisitor(org.openrewrite.trait.VisitFunction2<VariableAccess, P> visitor) - Specified by:
asVisitorin interfaceorg.openrewrite.trait.TraitMatcher<VariableAccess>- Overrides:
asVisitorin classorg.openrewrite.trait.SimpleTraitMatcher<VariableAccess>
-
higher
Since variable access is a trait of a leaf LST element (J.Identifier), there are no higher elements in the tree that could potentially match.- Specified by:
higherin interfaceorg.openrewrite.trait.TraitMatcher<VariableAccess>- Overrides:
higherin classorg.openrewrite.trait.SimpleTraitMatcher<VariableAccess>
-
test
- Specified by:
testin classorg.openrewrite.trait.SimpleTraitMatcher<VariableAccess>
-