Package spoon.reflect.visitor.filter
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
It can be used to search for variable declarations or variable references which might be in name conflict with input catch variable.
Usage:
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
apply(CtCatchVariable<?> catchVariable, CtConsumer<Object> outputConsumer)
Evaluates the function on the given input.
-
Constructor Details
-
CatchVariableScopeFunction
public CatchVariableScopeFunction() -
CatchVariableScopeFunction
-
-
Method Details
-
apply
Description copied from interface:CtConsumableFunction
Evaluates the function on the given input.- Specified by:
apply
in interfaceCtConsumableFunction<CtCatchVariable<?>>
- Parameters:
catchVariable
- the input of the functionoutputConsumer
- the consumer which accepts the results of this function.
-