diff --git a/src/main/java/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java b/src/main/java/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java index 27ac8dbb..eb1538d0 100644 --- a/src/main/java/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java +++ b/src/main/java/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java @@ -95,7 +95,11 @@ public class ASTFactory { var signature = methodSignatures.get(new Pair<>(constructor.getName(), org.objectweb.asm.Type.getConstructorDescriptor(constructor))); createConstructor(constructor, signature, jreClass).map(c -> konstruktoren.add(c)); } + Set allMethods = new HashSet<>(Arrays.asList(jreClass.getMethods())); + if (jreClass.isInterface()) + allMethods.addAll(Arrays.asList(Object.class.getMethods())); // For some reason interfaces don't inherit from Object + Set allDeclaredMethods = new HashSet<>(Arrays.asList(jreClass.getDeclaredMethods())); Set allInheritedMethods = new HashSet<>(allMethods); allInheritedMethods.removeAll(allDeclaredMethods);