< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/classfile/Annotation.java

Print this page

        

*** 129,138 **** --- 129,143 ---- Primitive_element_value(ClassReader cr, int tag) throws IOException { super(tag); const_value_index = cr.readUnsignedShort(); } + public Primitive_element_value(int const_value_index, int tag) { + super(tag); + this.const_value_index = const_value_index; + } + @Override public int length() { return 2; }
*** 149,158 **** --- 154,169 ---- super(tag); type_name_index = cr.readUnsignedShort(); const_name_index = cr.readUnsignedShort(); } + public Enum_element_value(int type_name_index, int const_name_index, int tag) { + super(tag); + this.type_name_index = type_name_index; + this.const_name_index = const_name_index; + } + @Override public int length() { return 4; }
*** 168,177 **** --- 179,193 ---- Class_element_value(ClassReader cr, int tag) throws IOException { super(tag); class_info_index = cr.readUnsignedShort(); } + public Class_element_value(int class_info_index, int tag) { + super(tag); + this.class_info_index = class_info_index; + } + @Override public int length() { return 2; }
*** 187,196 **** --- 203,217 ---- throws IOException, InvalidAnnotation { super(tag); annotation_value = new Annotation(cr); } + public Annotation_element_value(Annotation annotation_value, int tag) { + super(tag); + this.annotation_value = annotation_value; + } + @Override public int length() { return annotation_value.length(); }
*** 209,218 **** --- 230,245 ---- values = new element_value[num_values]; for (int i = 0; i < values.length; i++) values[i] = element_value.read(cr); } + public Array_element_value(element_value[] values, int tag) { + super(tag); + this.num_values = values.length; + this.values = values; + } + @Override public int length() { int n = 2; for (int i = 0; i < values.length; i++) n += values[i].length();
*** 232,241 **** --- 259,273 ---- throws IOException, InvalidAnnotation { element_name_index = cr.readUnsignedShort(); value = element_value.read(cr); } + public element_value_pair(int element_name_index, element_value value) { + this.element_name_index = element_name_index; + this.value = value; + } + public int length() { return 2 + value.length(); } public final int element_name_index;
< prev index next >