diff options
author | zaaarf <zaaarf@proton.me> | 2023-03-18 22:43:42 +0100 |
---|---|---|
committer | zaaarf <zaaarf@proton.me> | 2023-03-18 22:43:42 +0100 |
commit | 597fda2362e8261d6c617da7baef2dbd75d6d0d8 (patch) | |
tree | 714124a3d0d35e68e31e05a8c16215935f46611d /src/main/java/ftbsc/lll | |
parent | b394f7c5f0db2cf6e4f36ea4609e9b69618a834f (diff) |
fix: void is apparently not a primitive0.4.2
Diffstat (limited to 'src/main/java/ftbsc/lll')
-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 ); } |