Class LocalVariableScopeFunction

java.lang.Object
spoon.reflect.visitor.filter.LocalVariableScopeFunction
All Implemented Interfaces:
CtConsumableFunction<CtLocalVariable<?>>

public class LocalVariableScopeFunction extends Object implements CtConsumableFunction<CtLocalVariable<?>>
This Query expects a CtLocalVariable as input and returns all CtElements, which are in visibility scope of that local variable. In other words, it returns all elements, which might be reference to that local variable.
It can be used to search for variable declarations or variable references which might be in name conflict with input local variable.
Usage:
 
 CtLocalVariable var = ...;
 var.map(new LocalVariableScopeFunction()).forEach(...process result...);
 
 
  • Constructor Details

    • LocalVariableScopeFunction

      public LocalVariableScopeFunction()
    • LocalVariableScopeFunction

      public LocalVariableScopeFunction(CtScannerListener queryListener)
  • Method Details