Implement field injection test

This commit is contained in:
Gabriel Tofvesson 2020-04-16 22:19:46 +02:00
parent 7c75571733
commit 2745f391e9

View File

@ -4,12 +4,22 @@ import dev.w1zzrd.asm.Inject;
@InjectClass(value = MergeTest.class) @InjectClass(value = MergeTest.class)
public class MergeInject implements Runnable { public class MergeInject implements Runnable {
@Inject
public int number;
// Dummy field // Dummy field
String s; String s;
@Inject @Inject
public String test(){ MergeInject() {
s = "Hello";
number = 10;
}
@Inject
private String test(){
System.out.println(s); System.out.println(s);
System.out.println(number);
return "Modified"; return "Modified";
} }