[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:
22
testData/src/pkg/TypeAnnotations.java
Normal file
22
testData/src/pkg/TypeAnnotations.java
Normal 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) { }
|
||||
}
|
||||
Reference in New Issue
Block a user