We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0a6095 commit 9ef7d01Copy full SHA for 9ef7d01
src/main/java/anthonisen/felix/astParsing/visitors/ParameterTypeCollector.java
@@ -2,14 +2,19 @@
2
3
import java.util.Set;
4
5
+import com.github.javaparser.ast.body.ConstructorDeclaration;
6
import com.github.javaparser.ast.body.Parameter;
7
import com.github.javaparser.ast.type.Type;
8
import com.github.javaparser.ast.visitor.VoidVisitorAdapter;
9
10
public class ParameterTypeCollector extends VoidVisitorAdapter<Set<Type>> {
11
+
12
+ @SuppressWarnings("unchecked")
13
@Override
14
public void visit(Parameter n, Set<Type> arg) {
15
super.visit(n, arg);
- arg.add(n.getType());
16
17
+ if (!n.findAncestor(ConstructorDeclaration.class).isPresent())
18
+ arg.add(n.getType());
19
}
20
0 commit comments