From 856d343ed3a4536dee77c98f48db2eb70b16eebc Mon Sep 17 00:00:00 2001 From: Andreas Stadelmeier Date: Mon, 20 Mar 2023 19:09:47 +0100 Subject: [PATCH] Consider public and standard constructors ones --- .../java/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java b/src/main/java/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java index 79b6d281..e71836c1 100644 --- a/src/main/java/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java +++ b/src/main/java/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java @@ -35,8 +35,8 @@ public class ASTFactory { JavaClassName name = new JavaClassName(jreClass.getName()); List methoden = new ArrayList<>(); List konstruktoren = new ArrayList<>(); - for(java.lang.reflect.Constructor constructor : jreClass.getConstructors()){ - createConstructor(constructor, jreClass).map(c -> konstruktoren.add(c)); + for(java.lang.reflect.Constructor constructor : jreClass.getDeclaredConstructors()){ + createConstructor(constructor, jreClass).map(c -> konstruktoren.add(c)); } Set allMethods = new HashSet<>(Arrays.asList(jreClass.getMethods())); Set allDeclaredMethods = new HashSet<>(Arrays.asList(jreClass.getDeclaredMethods()));