[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:
44
testData/results/TypeAnnotations.dec
Normal file
44
testData/results/TypeAnnotations.dec
Normal file
@@ -0,0 +1,44 @@
|
||||
package pkg;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
class TypeAnnotations {
|
||||
@TypeAnnotations.TA("field type")
|
||||
private String f1;
|
||||
@TypeAnnotations.MixA("field and type")
|
||||
private String f2;
|
||||
|
||||
@TypeAnnotations.TA("return type")
|
||||
int m1() {
|
||||
return 42;// 18
|
||||
}
|
||||
|
||||
void m2(@TypeAnnotations.TA("parameter") int var1) {
|
||||
}// 21
|
||||
|
||||
@Target({ElementType.FIELD, ElementType.TYPE_USE})
|
||||
@interface MixA {
|
||||
String value();
|
||||
}
|
||||
|
||||
@Target({ElementType.TYPE_USE})
|
||||
@interface TA {
|
||||
String value();
|
||||
}
|
||||
}
|
||||
|
||||
class 'pkg/TypeAnnotations' {
|
||||
method 'm1 ()I' {
|
||||
0 13
|
||||
2 13
|
||||
}
|
||||
|
||||
method 'm2 (I)V' {
|
||||
0 17
|
||||
}
|
||||
}
|
||||
|
||||
Lines mapping:
|
||||
18 <-> 14
|
||||
21 <-> 18
|
||||
Reference in New Issue
Block a user