diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/ftbsc/lll/processor/LilleroProcessor.java | 1 | ||||
-rw-r--r-- | src/main/java/ftbsc/lll/processor/tools/JavaPoetUtils.java | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/ftbsc/lll/processor/LilleroProcessor.java b/src/main/java/ftbsc/lll/processor/LilleroProcessor.java index aa96fbd..02d7e27 100644 --- a/src/main/java/ftbsc/lll/processor/LilleroProcessor.java +++ b/src/main/java/ftbsc/lll/processor/LilleroProcessor.java @@ -218,7 +218,6 @@ public class LilleroProcessor extends AbstractProcessor { if(injectionCandidates.size() == 1) injectionTarget = injectionCandidates.get(0); - else { List<TypeMirror> params = classArrayFromAnnotation(injectorAnn, Injector::params, processingEnv.getElementUtils()); diff --git a/src/main/java/ftbsc/lll/processor/tools/JavaPoetUtils.java b/src/main/java/ftbsc/lll/processor/tools/JavaPoetUtils.java index d59bc11..0591929 100644 --- a/src/main/java/ftbsc/lll/processor/tools/JavaPoetUtils.java +++ b/src/main/java/ftbsc/lll/processor/tools/JavaPoetUtils.java @@ -7,7 +7,7 @@ import ftbsc.lll.proxies.FieldProxy; import javax.lang.model.element.ExecutableElement; import javax.lang.model.element.Modifier; -import javax.lang.model.type.ArrayType; +import javax.lang.model.type.TypeKind; import javax.lang.model.type.TypeMirror; import javax.lang.model.util.Elements; import java.lang.annotation.Annotation; @@ -125,7 +125,7 @@ public class JavaPoetUtils { */ public static void addTypeToProxyGenerator(MethodSpec.Builder b, String proxyBuilderName, String proxyBuilderMethod, TypeMirror t) { String insn = String.format("%s.%s", proxyBuilderName, proxyBuilderMethod); - if(t.getKind().isPrimitive()) + if(t.getKind().isPrimitive() || t.getKind() == TypeKind.VOID) b.addStatement(insn + "($T.class)", t); else { ArrayContainer arr = new ArrayContainer(t); @@ -134,7 +134,7 @@ public class JavaPoetUtils { type = ((ParameterizedTypeName) type).rawType; b.addStatement( insn + "($S, $L)", - type, + type.toString(), arr.arrayLevel ); } |