public class SubInheritanceHierarchyFunction extends java.lang.Object implements CtConsumableFunction<CtTypeInformation>, CtQueryAware
CtTypeInformation
as input
and produces all sub classes and sub interfaces recursively.Constructor and Description |
---|
SubInheritanceHierarchyFunction()
The mapping function created using this constructor
will visit each sub class and sub interface
following sub hierarchy.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(CtTypeInformation input,
CtConsumer<java.lang.Object> outputConsumer)
Evaluates the function on the given input.
|
SubInheritanceHierarchyFunction |
failOnClassNotFound(boolean failOnClassNotFound) |
SubInheritanceHierarchyFunction |
includingInterfaces(boolean includingInterfaces) |
SubInheritanceHierarchyFunction |
includingSelf(boolean includingSelf) |
void |
setQuery(CtQuery query)
This method is called when the filter/function is added as a step to a
CtQuery by the query engine (CtQueryImpl ). |
public SubInheritanceHierarchyFunction()
public SubInheritanceHierarchyFunction includingSelf(boolean includingSelf)
includingSelf
- if true then input element is sent to output too. By default it is false.public SubInheritanceHierarchyFunction includingInterfaces(boolean includingInterfaces)
includingInterfaces
- if false then interfaces are not visited - only super classes. By default it is true.public SubInheritanceHierarchyFunction failOnClassNotFound(boolean failOnClassNotFound)
failOnClassNotFound
- sets whether processing should throw an exception if class is missing in noClassPath modepublic void apply(CtTypeInformation input, CtConsumer<java.lang.Object> outputConsumer)
CtConsumableFunction
apply
in interface CtConsumableFunction<CtTypeInformation>
input
- the input of the functionoutputConsumer
- the consumer which accepts the results of this function.public void setQuery(CtQuery query)
CtQueryAware
CtQuery
by the query engine (CtQueryImpl
).setQuery
in interface CtQueryAware
query
- an instance registering this function/filter.Copyright © 2007–2021 Inria. All rights reserved.