Package spoon.reflect.visitor.filter
Class VariableReferenceFunction
java.lang.Object
spoon.reflect.visitor.filter.VariableReferenceFunction
- All Implemented Interfaces:
CtConsumableFunction<CtElement>
Mapping function for determining all
CtVariableReferences that refer to a given CtVariable.
The following subtypes of CtVariable are supported:
- CtLocalVariable - local variable declared in body
- CtField - member field of a type
- CtEnumValue - member field of an enum
- CtParameter - method parameter
- CtCatchVariable - try-catch variable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CtConsumer<Object>protected CtElementprotected final VariableReferenceFunction.Visitor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(CtElement variableOrScope, CtConsumer<Object> outputConsumer) Evaluates the function on the given input.
-
Field Details
-
visitor
-
outputConsumer
-
scope
-
-
Constructor Details
-
VariableReferenceFunction
public VariableReferenceFunction() -
VariableReferenceFunction
-
-
Method Details
-
apply
Description copied from interface:CtConsumableFunctionEvaluates the function on the given input.- Specified by:
applyin interfaceCtConsumableFunction<CtElement>- Parameters:
variableOrScope- the input of the functionoutputConsumer- the consumer which accepts the results of this function.
-