aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc
diff options
context:
space:
mode:
author zaaarf <zaaarf@proton.me>2023-03-17 19:09:32 +0100
committer zaaarf <zaaarf@proton.me>2023-03-17 19:09:32 +0100
commit5fd954a1188afb230f2b1ae70834110e742a3c99 (patch)
treebb525c3c572df5c94cbd713b8c5558e4c3587773 /src/main/java/ftbsc
parent3b560f5990c9c96a7f31860735b0b60eb798e7d3 (diff)
fix: fixed NoClassDefFoundError for non-java classes
Diffstat (limited to 'src/main/java/ftbsc')
-rw-r--r--src/main/java/ftbsc/lll/processor/LilleroProcessor.java17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/main/java/ftbsc/lll/processor/LilleroProcessor.java b/src/main/java/ftbsc/lll/processor/LilleroProcessor.java
index a965068..957785b 100644
--- a/src/main/java/ftbsc/lll/processor/LilleroProcessor.java
+++ b/src/main/java/ftbsc/lll/processor/LilleroProcessor.java
@@ -329,10 +329,16 @@ public class LilleroProcessor extends AbstractProcessor {
for(Modifier mod : targetMethod.getModifiers())
b.addStatement("bd.addModifier($L)", mapModifier(mod));
- for(VariableElement p : targetMethod.getParameters())
- b.addStatement("bd.addParameter($T.class)",p.asType());
+ for(VariableElement p : targetMethod.getParameters()) {
+ if(p.asType().getKind().isPrimitive())
+ b.addStatement("bd.addParameter($T.class)", p.asType());
+ else b.addStatement("bd.addParameter($S)", p.asType().toString());
+ }
+
+ if(targetMethod.getReturnType().getKind().isPrimitive())
+ b.addStatement("bd.setReturnType($T.class)", targetMethod.getReturnType());
+ else b.addStatement("bd.setReturnType($S)", targetMethod.getReturnType().toString());
- b.addStatement("bd.setReturnType($T.class)", targetMethod.getReturnType());
b.addStatement("return bd.build()");
generated.add(b.build());
@@ -358,7 +364,10 @@ public class LilleroProcessor extends AbstractProcessor {
for(Modifier mod : targetField.getModifiers())
b.addStatement("bd.addModifier($L)", mapModifier(mod));
- b.addStatement("bd.setType($T.class)", targetField.asType());
+ if(targetField.asType().getKind().isPrimitive())
+ b.addStatement("bd.setType($T.class)", targetField.asType());
+ else b.addStatement("bd.setType($S)", targetField.asType().toString());
+
b.addStatement("return bd.build()");
generated.add(b.build());