Class CatchVariableScopeFunction

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

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

    • CatchVariableScopeFunction

      public CatchVariableScopeFunction()
    • CatchVariableScopeFunction

      public CatchVariableScopeFunction(CtScannerListener queryListener)
  • Method Details