Skip to content

Commit

Permalink
rename to SuperInheritanceHierarchyFunction
Browse files Browse the repository at this point in the history
  • Loading branch information
pvojtechovsky committed Mar 11, 2017
1 parent 987f868 commit 664afca
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public AllTypeMembersFunction distinctSet(Set<String> distintSet) {

@Override
public void apply(CtType<?> input, final CtConsumer<Object> outputConsumer) {
final CtQuery q = input.map(new SuperHierarchyFunction(distintSet == null ? new HashSet<String>() : distintSet).includingSelf(true));
final CtQuery q = input.map(new SuperInheritanceHierarchyFunction(distintSet == null ? new HashSet<String>() : distintSet).includingSelf(true));
q.forEach(new CtConsumer<CtType<?>>() {
@Override
public void accept(CtType<?> type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* <li>goto 1: using parent class as input type
* </ol>
*/
public class SuperHierarchyFunction implements CtConsumableFunction<CtType<?>>, CtQueryAware {
public class SuperInheritanceHierarchyFunction implements CtConsumableFunction<CtType<?>>, CtQueryAware {
private boolean includingSelf = false;
private boolean includingInterfaces = true;
private Set<String> visitedSet;
Expand All @@ -56,28 +56,28 @@ public class SuperHierarchyFunction implements CtConsumableFunction<CtType<?>>,
* if they are in hierarchy more then once.<br>
* Use second constructor if you want to visit each interface only once.
*/
public SuperHierarchyFunction() {
public SuperInheritanceHierarchyFunction() {
}

/**
* @param visitedSet assures that each class/interface is visited only once
*/
public SuperHierarchyFunction(Set<String> visitedSet) {
public SuperInheritanceHierarchyFunction(Set<String> visitedSet) {
this.visitedSet = visitedSet;
}

/**
* @param includingSelf if true then input element is sent to output too. By default it is false.
*/
public SuperHierarchyFunction includingSelf(boolean includingSelf) {
public SuperInheritanceHierarchyFunction includingSelf(boolean includingSelf) {
this.includingSelf = includingSelf;
return this;
}

/**
* @param includingInterfaces if false then interfaces are not visited - only super classes. By default it is true.
*/
public SuperHierarchyFunction includingInterfaces(boolean includingInterfaces) {
public SuperInheritanceHierarchyFunction includingInterfaces(boolean includingInterfaces) {
this.includingInterfaces = includingInterfaces;
return this;
}
Expand Down Expand Up @@ -188,7 +188,10 @@ public void setQuery(CtQuery query) {
this.query = query;
}

public SuperHierarchyFunction failOnClassNotFound(boolean failOnClassNotFound) {
/**
* @param failOnClassNotFound sets whether processing should throw an exception if class is missing in noClassPath mode
*/
public SuperInheritanceHierarchyFunction failOnClassNotFound(boolean failOnClassNotFound) {
this.failOnClassNotFound = failOnClassNotFound;
return this;
}
Expand Down

0 comments on commit 664afca

Please sign in to comment.