Package spoon.reflect.visitor.filter
Class SubInheritanceHierarchyFunction
java.lang.Object
spoon.reflect.visitor.filter.SubInheritanceHierarchyFunction
- All Implemented Interfaces:
CtConsumableFunction<CtTypeInformation>
,CtQueryAware
public class SubInheritanceHierarchyFunction
extends Object
implements CtConsumableFunction<CtTypeInformation>, CtQueryAware
Expects a
The output is produced in arbitrary order.
CtTypeInformation
as input
and produces all sub classes and sub interfaces recursively.The output is produced in arbitrary order.
-
Constructor Summary
ConstructorDescriptionThe mapping function created using this constructor will visit each sub class and sub interface following sub hierarchy. -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply(CtTypeInformation input, CtConsumer<Object> outputConsumer)
Evaluates the function on the given input.failOnClassNotFound(boolean failOnClassNotFound)
includingInterfaces(boolean includingInterfaces)
includingSelf(boolean includingSelf)
void
This method is called when the filter/function is added as a step to aCtQuery
by the query engine (CtQueryImpl
).
-
Constructor Details
-
SubInheritanceHierarchyFunction
public SubInheritanceHierarchyFunction()The mapping function created using this constructor will visit each sub class and sub interface following sub hierarchy.
-
-
Method Details
-
includingSelf
- Parameters:
includingSelf
- if true then input element is sent to output too. By default it is false.
-
includingInterfaces
- Parameters:
includingInterfaces
- if false then interfaces are not visited - only super classes. By default it is true.
-
failOnClassNotFound
- Parameters:
failOnClassNotFound
- sets whether processing should throw an exception if class is missing in noClassPath mode
-
apply
Description copied from interface:CtConsumableFunction
Evaluates the function on the given input.- Specified by:
apply
in interfaceCtConsumableFunction<CtTypeInformation>
- Parameters:
input
- the input of the functionoutputConsumer
- the consumer which accepts the results of this function.
-
setQuery
Description copied from interface:CtQueryAware
This method is called when the filter/function is added as a step to aCtQuery
by the query engine (CtQueryImpl
).- Specified by:
setQuery
in interfaceCtQueryAware
- Parameters:
query
- an instance registering this function/filter.
-