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 Details

    • Matcher

      public Matcher()
  • Method Details

    • isOfType

      public VariableAccess.Matcher isOfType(JavaType type)
    • isOfClassType

      public VariableAccess.Matcher isOfClassType(String fullyQualifiedName)
    • asVisitor

      public <P> org.openrewrite.TreeVisitor<? extends org.openrewrite.Tree,P> asVisitor(org.openrewrite.trait.VisitFunction2<VariableAccess,P> visitor)
      Specified by:
      asVisitor in interface org.openrewrite.trait.TraitMatcher<VariableAccess>
      Overrides:
      asVisitor in class org.openrewrite.trait.SimpleTraitMatcher<VariableAccess>
    • higher

      public Stream<VariableAccess> 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.
      Specified by:
      higher in interface org.openrewrite.trait.TraitMatcher<VariableAccess>
      Overrides:
      higher in class org.openrewrite.trait.SimpleTraitMatcher<VariableAccess>
    • test

      protected @Nullable VariableAccess test(org.openrewrite.Cursor cursor)
      Specified by:
      test in class org.openrewrite.trait.SimpleTraitMatcher<VariableAccess>