diff options
Diffstat (limited to 'src/main/java/ftbsc')
-rw-r--r-- | src/main/java/ftbsc/lll/processor/tools/JavaPoetUtils.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/ftbsc/lll/processor/tools/JavaPoetUtils.java b/src/main/java/ftbsc/lll/processor/tools/JavaPoetUtils.java index 6ae867b..e2c8f2e 100644 --- a/src/main/java/ftbsc/lll/processor/tools/JavaPoetUtils.java +++ b/src/main/java/ftbsc/lll/processor/tools/JavaPoetUtils.java @@ -192,10 +192,11 @@ public class JavaPoetUtils { public static HashSet<MethodSpec> generateDummies(Collection<ExecutableElement> dummies) { HashSet<MethodSpec> specs = new HashSet<>(); for(ExecutableElement d : dummies) - specs.add(MethodSpec.overriding(d) - .addStatement("throw new $T($S)", RuntimeException.class, "This is a stub and should not have been called") - .build() - ); + if(d.getModifiers().contains(Modifier.ABSTRACT)) + specs.add(MethodSpec.overriding(d) + .addStatement("throw new $T($S)", RuntimeException.class, "This is a stub and should not have been called") + .build() + ); return specs; } } |