Community
Participate
Working Groups
Right now the disassembler only shows the parameter annotations in SYSTEM mode as a separate attribute. The following code: import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.*; @Retention(CLASS) @interface X { int value() default -1; } is displayed using the SYSTEM mode as: // Method descriptor #15 (I)V // Stack: 0, Locals: 2 public void foo(int i); 0 return Line numbers: [pc: 0, line: 4] Local variable table: [pc: 0, pc: 1] local: this index: 0 type: X [pc: 0, pc: 1] local: i index: 1 type: int RuntimeVisibleParameterAnnotations: Number of annotations for parameter 0: 1 #21 @java.lang.Deprecated( ) RuntimeInvisibleParameterAnnotations: Number of annotations for parameter 0: 1 #17 @Annot( #18 value=(int) 2 (constant type) ) is displayed using the DETAILED mode as: // Method descriptor #15 (I)V // Stack: 0, Locals: 2 public void foo(int i); 0 return Line numbers: [pc: 0, line: 4] Local variable table: [pc: 0, pc: 1] local: this index: 0 type: X [pc: 0, pc: 1] local: i index: 1 type: int It would be nice to also be able to get the parameter annotation in DETAILED mode.
import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.*; public class X { public void foo(@Deprecated @Zork @Annot(2) int i) {} } @Retention(CLASS) @interface Annot { int value() default -1; }
Created attachment 89949 [details] Proposed fix
Released for 3.4M6. Philippe, please verify that it meets your expectations.
Added regression test org.eclipse.jdt.core.tests.compiler.regression.ClassFileReaderTest_1_5#test015
Verified for 3.4M6 using build I20080325-2233