[java, java-decompiler] type annotations in class files

Step 1: add top-level field/method/parameter annotations to stubs; include them in decompiled text.
This commit is contained in:
Roman Shevchenko
2016-04-21 21:22:36 +02:00
parent a8403429ef
commit 52b31bf325
13 changed files with 316 additions and 241 deletions

View File

@@ -0,0 +1,22 @@
package pkg;
import java.lang.annotation.*;
import java.util.*;
class TypeAnnotations {
@Target(ElementType.TYPE_USE)
@interface TA { String value(); }
@Target({ElementType.FIELD, ElementType.TYPE_USE})
@interface MixA { String value(); }
private @TA("field type") String f1;
private @MixA("field and type") String f2;
@TA("return type") int m1() {
return 42;
}
void m2(@TA("parameter") int i) { }
}