Lines Matching full:code
12 <h1 class="title"><code>.dex</code> — Dalvik Executable Format</h1>
15 <p>This document describes the layout and contents of <code>.dex</code>
71 <td>unsigned LEB128 plus <code>1</code>, variable-length (see below)</td>
82 specification. In a <code>.dex</code> file, LEB128 is only ever used to
91 byte and so on. In the case of a signed LEB128 (<code>sleb128</code>),
94 (<code>uleb128</code>), any bits not explicitly represented are
95 interpreted as <code>0</code>.
107 <td class="start1"><code>1</code></td>
115 <td class="start2"><code>0</code></td>
127 <p>The variant <code>uleb128p1</code> is used to represent a signed
129 as a <code>uleb128</code>. This makes the encoding of <code>-1</code>
130 (alternatively thought of as the unsigned value <code>0xffffffff</code>)
133 be non-negative or <code>-1</code> (or <code>0xffffffff</code>),
143 <th>As <code>sleb128</code></th>
144 <th>As <code>uleb128</code></th>
145 <th>As <code>uleb128p1</code></th>
177 or as constant objects referred to by code. This list must be sorted
178 by string contents, using UTF-16 code point values (not in a
187 in the file or not. This list must be sorted by <code>string_id</code>
196 return-type (by <code>type_id</code> index) major order, and then
197 by arguments (also by <code>type_id</code> index).
205 list must be sorted, where the defining type (by <code>type_id</code>
206 index) is the major order, field name (by <code>string_id</code> index)
207 is the intermediate order, and type (by <code>type_id</code> index)
216 list must be sorted, where the defining type (by <code>type_id</code>
217 index) is the major order, method name (by <code>string_id</code>
219 prototype (by <code>proto_id</code> index) is the minor order.
253 <h2><code>DEX_FILE_MAGIC</code></h2>
254 <h4>embedded in <code>header_item</code></h4>
256 <p>The constant array/string <code>DEX_FILE_MAGIC</code> is the list of
257 bytes that must appear at the beginning of a <code>.dex</code> file
259 contains a newline (<code>"\n"</code> or <code>0x0a</code>) and a
260 null byte (<code>"\0"</code> or <code>0x00</code>) in order to help
272 version <code>009</code> was used for the M3 releases of the
274 and version <code>013</code> was used for the M5 releases of the Android
279 <h2><code>ENDIAN_CONSTANT</code> and <code>REVERSE_ENDIAN_CONSTANT</code></h2>
280 <h4>embedded in <code>header_item</code></h4>
282 <p>The constant <code>ENDIAN_CONSTANT</code> is used to indicate the
284 <code>.dex</code> format is little-endian, implementations may choose
286 header whose <code>endian_tag</code> is <code>REVERSE_ENDIAN_CONSTANT</code>
287 instead of <code>ENDIAN_CONSTANT</code>, it would know that the file
295 <h2><code>NO_INDEX</code></h2>
296 <h4>embedded in <code>class_def_item</code> and
297 <code>debug_info_item</code></h4>
299 <p>The constant <code>NO_INDEX</code> is used to indicate that
303 <code>0</code>, because that is in fact typically a valid index.</p>
305 <p><b>Also Note:</b> The chosen value for <code>NO_INDEX</code> is
306 representable as a single byte in the <code>uleb128p1</code> encoding.</p>
312 <h2><code>access_flags</code> Definitions</h2>
313 <h4>embedded in <code>class_def_item</code>,
314 <code>field_item</code>, <code>method_item</code>, and
315 <code>InnerClass</code></h4>
325 <th>For Classes (and <code>InnerClass</code> annotations)</th>
334 <td><code>public</code>: visible everywhere</td>
335 <td><code>public</code>: visible everywhere</td>
336 <td><code>public</code>: visible everywhere</td>
342 <code>private</code>: only visible to defining class
344 <td><code>private</code>: only visible to defining class</td>
345 <td><code>private</code>: only visible to defining class</td>
351 <code>protected</code>: visible to package and subclasses
353 <td><code>protected</code>: visible to package and subclasses</td>
354 <td><code>protected</code>: visible to package and subclasses</td>
360 <code>static</code>: is not constructed with an outer
361 <code>this</code> reference</td>
362 <td><code>static</code>: global to defining class</td>
363 <td><code>static</code>: does not take a <code>this</code> argument</td>
368 <td><code>final</code>: not subclassable</td>
369 <td><code>final</code>: immutable after construction</td>
370 <td><code>final</code>: not overridable</td>
377 <td><code>synchronized</code>: associated lock automatically acquired
379 <code>ACC_NATIVE</code> is also set.</td>
385 <td><code>volatile</code>: special access rules to help with thread
401 <td><code>transient</code>: not to be saved by default serialization</td>
416 <td><code>native</code>: implemented in native code</td>
421 <td><code>interface</code>: multiply-implementable abstract class</td>
428 <td><code>abstract</code>: not directly instantiable</td>
430 <td><code>abstract</code>: unimplemented by this class</td>
437 <td><code>strictfp</code>: strict rules for floating-point arithmetic</td>
442 <td>not directly defined in source code</td>
443 <td>not directly defined in source code</td>
444 <td>not directly defined in source code</td>
479 <td>declared <code>synchronized</code>. <b>Note:</b> This has no effect on
486 <p><super>*</super> Only allowed on for <code>InnerClass</code> annotations,
487 and must not ever be on in a <code>class_def_item</code>.</p>
491 <p>As a concession to easier legacy support, the <code>.dex</code> format
497 <li>Code points in the range <code>U+10000</code> …
498 <code>U+10ffff</code> are encoded as a surrogate pair, each of
500 <li>The code point <code>U+0000</code> is encoded in two-byte form.</li>
501 <li>A plain null byte (value <code>0</code>) indicates the end of
510 the code point <code>U+0000</code> in a string <i>and</i> still manipulate
513 <p>However, the special encoding of <code>U+0000</code> means that, unlike
515 <code>strcmp()</code> on a pair of MUTF-8 strings does not always
528 <h2><code>encoded_value</code> Encoding</h2>
529 <h4>embedded in <codecode> and
530 <code>encoded_array_item</code></h4>
532 <p>An <code>encoded_value</code> is an encoded piece of (nearly)
549 <code>value</code> along
551 See below for the various <code>value</code> definitions.
552 In most cases, <code>value_arg</code> encodes the length of
553 the immediately-subsequent <code>value</code> in bytes, as
554 <code>(size - 1)</code>, e.g., <code>0</code> means that
555 the value requires one byte, and <code>7</code> means it requires
563 differently for different <code>value_type</code> bytes, though
577 <th><code>value_type</code></th>
578 <th><code>value_arg</code> Format</th>
579 <th><code>value</code> Format</th>
587 <td><i>(none; must be <code>0</code>)</i></td>
644 the <code>string_ids</code> section and representing a string value
654 the <code>type_ids</code> section and representing a reflective
665 the <code>field_ids</code> section and representing a reflective
676 the <code>method_ids</code> section and representing a reflective
687 the <code>field_ids</code> section and representing the value of
694 <td><i>(none; must be <code>0</code>)</i></td>
697 "<code>encoded_array</code> Format" below. The size
698 of the <code>value</code> is implicit in the encoding.
704 <td><i>(none; must be <code>0</code>)</i></td>
707 "<code>encoded_annotation</code> Format" below. The size
708 of the <code>value</code> is implicit in the encoding.
714 <td><i>(none; must be <code>0</code>)</i></td>
716 <td><code>null</code> reference value</td>
723 <td>one-bit value; <code>0</code> for <code>false</code> and
724 <code>1</code> for <code>true</code>. The bit is represented in the
725 <code>value_arg</code>.
731 <h3><code>encoded_array</code> Format</h3>
750 <td>a series of <code>size</code> <code>encoded_value</code> byte
758 <h3><code>encoded_annotation</code> Format</h3>
786 <code>string_id</code> index.
792 <h3><code>annotation_element</code> Format</h3>
807 <code>string_ids</code> section. The string must conform to the
821 <p>There are several kinds of item in a <code>.dex</code> file which
828 things. The <code>.dex</code> format allows a fair amount of latitude
831 specific low-ASCII symbols, and most non-ASCII code points that are not
832 control, space, or special characters. Note that surrogate code points
833 (in the range <code>U+d800</code> … <code>U+dfff</code>) are not
837 represented in a file as pairs of surrogate code points in the MUTF-8
850 <td><code>'A'</code> … <code>'Z'</code></td>
854 <td><code>'a'</code> … <code>'z'</code></td>
858 <td><code>'0'</code> … <code>'9'</code></td>
862 <td><code>'$'</code></td>
866 <td><code>'-'</code></td>
870 <td><code>'_'</code></td>
874 <td><code>U+00a1</code> … <code>U+1fff</code></td>
878 <td><code>U+2010</code> … <code>U+2027</code></td>
882 <td><code>U+2030</code> … <code>U+d7ff</code></td>
886 <td><code>U+e000</code> … <code>U+ffef</code></td>
890 <td><code>U+10000</code> … <code>U+10ffff</code></td>
895 <h4>used by <code>field_id_item</code> and <code>method_id_item</code></h4>
908 <td><code>'<'</code> <i>SimpleName</i> <code>'>'</code></td>
927 <td>(<i>SimpleName</i> <code>'/'</code>)*</td>
932 <h4>used by <code>type_id_item</code></h4>
935 primitives, classes, arrays, and <code>void</code>. See below for
942 <td><code>'V'</code></td>
956 <td>(<code>'['</code> * 1…255)
965 <td><code>'Z'</code></td>
969 <td><code>'B'</code></td>
973 <td><code>'S'</code></td>
977 <td><code>'C'</code></td>
981 <td><code>'I'</code></td>
985 <td><code>'J'</code></td>
989 <td><code>'F'</code></td>
993 <td><code>'D'</code></td>
997 <td><code>'L'</code> <i>FullClassName</i> <code>';'</code></td>
1002 <h4>used by <code>proto_id_item</code></h4>
1007 all reference types are represented by a single <code>'L'</code> character.</p>
1019 <td><code>'V'</code></td>
1029 <td><code>'Z'</code></td>
1033 <td><code>'B'</code></td>
1037 <td><code>'S'</code></td>
1041 <td><code>'C'</code></td>
1045 <td><code>'I'</code></td>
1049 <td><code>'J'</code></td>
1053 <td><code>'F'</code></td>
1057 <td><code>'D'</code></td>
1061 <td><code>'L'</code></td>
1079 <td><code>void</code>; only valid for return types</td>
1083 <td><code>boolean</code></td>
1087 <td><code>byte</code></td>
1091 <td><code>short</code></td>
1095 <td><code>char</code></td>
1099 <td><code>int</code></td>
1103 <td><code>long</code></td>
1107 <td><code>float</code></td>
1111 <td><code>double</code></td>
1115 <td>the class <code><i>fully.qualified.Name</i></code></td>
1119 <td>array of <code><i>descriptor</i></code>, usable recursively for
1130 may appear in a <code>.dex</code> file.
1132 <h2><code>header_item</code></h2>
1133 <h4>appears in the <code>header</code> section</h4>
1148 <td>magic value. See discussion above under "<code>DEX_FILE_MAGIC</code>"
1156 <code>magic</code> and this field); used to detect file corruption
1163 <code>magic</code>, <code>checksum</code>, and this field); used
1183 <td>endianness tag. See discussion above under "<code>ENDIAN_CONSTANT</code>
1184 and <code>REVERSE_ENDIAN_CONSTANT</code>" for more details.
1190 <td>size of the link section, or <code>0</code> if this file isn't
1197 <code>0</code> if <code>link_size == 0</code>. The offset, if non-zero,
1198 should be to an offset into the <code>link_data</code> section. The
1208 <code>0</code> if this file has no map. The offset, if non-zero,
1209 should be to an offset into the <code>data</code> section,
1210 and the data should be in the format specified by "<code>map_list</code>"
1223 <code>0</code> if <code>string_ids_size == 0</code> (admittedly a
1225 should be to the start of the <code>string_ids</code> section.
1237 <code>0</code> if <code>type_ids_size == 0</code> (admittedly a
1239 should be to the start of the <code>type_ids</code>
1252 <code>0</code> if <code>proto_ids_size == 0</code> (admittedly a
1254 should be to the start of the <code>proto_ids</code>
1267 <code>0</code> if <code>field_ids_size == 0</code>. The offset, if
1268 non-zero, should be to the start of the <code>field_ids</code>
1281 <code>0</code> if <code>method_ids_size == 0</code>. The offset, if
1282 non-zero, should be to the start of the <code>method_ids</code>
1294 <code>0</code> if <code>class_defs_size == 0</code> (admittedly a
1296 should be to the start of the <code>class_defs</code> section.
1302 <td>Size of <code>data</code> section in bytes. Must be an even
1309 <code>data</code> section.
1315 <h2><code>map_list</code></h2>
1316 <h4>appears in the <code>data</code> section</h4>
1317 <h4>referenced from <code>header_item</code></h4>
1321 contains some redundancy with respect to the <code>header_item</code>
1326 <code>header</code> section must appear first, followed by a
1327 <code>string_ids</code> section, etc.). Additionally, the map entries must
1352 <h3><code>map_item</code> Format</h3>
1511 <h2><code>string_id_item</code></h2>
1512 <h4>appears in the <code>string_ids</code> section</h4>
1529 in the <code>data</code> section, and the data should be in the
1530 format specified by "<code>string_data_item</code>" below.
1537 <h2><code>string_data_item</code></h2>
1538 <h4>appears in the <code>data</code> section</h4>
1553 <td>size of this string, in UTF-16 code units (which is the "string
1556 the <code>0</code> byte.)</td>
1561 <td>a series of MUTF-8 code units (a.k.a. octets, a.k.a. bytes)
1562 followed by a byte of value <code>0</code>. See
1566 (the encoded form of) UTF-16 surrogate code units (that is,
1567 <code>U+d800</code> … <code>U+dfff</code>)
1576 <h2><code>type_id_item</code></h2>
1577 <h4>appears in the <code>type_ids</code> section</h4>
1592 <td>index into the <code>string_ids</code> list for the descriptor
1600 <h2><code>proto_id_item</code></h2>
1601 <h4>appears in the <code>proto_ids</code> section</h4>
1616 <td>index into the <code>string_ids</code> list for the short-form
1625 <td>index into the <code>type_ids</code> list for the return type
1633 for this prototype, or <code>0</code> if this prototype has no
1635 <code>data</code> section, and the data there should be in the
1636 format specified by <code>"type_list"</code> below. Additionally, there
1637 should be no reference to the type <code>void</code> in the list.
1643 <h2><code>field_id_item</code></h2>
1644 <h4>appears in the <code>field_ids</code> section</h4>
1659 <td>index into the <code>type_ids</code> list for the definer of this
1666 <td>index into the <code>type_ids</code> list for the type of
1673 <td>index into the <code>string_ids</code> list for the name of this
1681 <h2><code>method_id_item</code></h2>
1682 <h4>appears in the <code>method_ids</code> section</h4>
1697 <td>index into the <code>type_ids</code> list for the definer of this
1704 <td>index into the <code>proto_ids</code> list for the prototype of
1711 <td>index into the <code>string_ids</code> list for the name of this
1719 <h2><code>class_def_item</code></h2>
1720 <h4>appears in the <code>class_defs</code> section</h4>
1735 <td>index into the <code>type_ids</code> list for this class.
1742 <td>access flags for the class (<code>public</code>, <code>final</code>,
1743 etc.). See "<code>access_flags</code> Definitions" for details.
1749 <td>index into the <code>type_ids</code> list for the superclass, or
1750 the constant value <code>NO_INDEX</code> if this class has no
1751 superclass (i.e., it is a root class such as <code>Object</code>).
1759 <code>0</code> if there are none. This offset
1760 should be in the <code>data</code> section, and the data
1762 "<code>type_list</code>" below. Each of the elements of the list
1770 <td>index into the <code>string_ids</code> list for the name of the
1772 or the special value <code>NO_INDEX</code> to represent a lack of
1773 this information. The <code>debug_info_item</code> of any given method
1782 for this class, or <code>0</code> if there are no annotations on
1784 <code>data</code> section, and the data there should be in
1785 the format specified by "<code>annotations_directory_item</code>" below,
1793 class data for this item, or <code>0</code> if there is no class
1796 <code>data</code> section, and the data there should be in the
1797 format specified by "<code>class_data_item</code>" below, with all
1805 values for <code>static</code> fields, or <code>0</code> if there
1806 are none (and all <code>static</code> fields are to be initialized with
1807 <code>0</code> or <code>null</code>). This offset should be in the
1808 <code>data</code> section, and the data there should be in the
1809 format specified by "<code>encoded_array_item</code>" below. The size
1810 of the array must be no larger than the number of <code>static</code>
1812 <code>static</code> fields in the same order as declared in the
1813 corresponding <code>field_list</code>. The type of each array
1816 <code>static</code> fields, then the leftover fields are initialized
1817 with a type-appropriate <code>0</code> or <code>null</code>.
1823 <h2><code>class_data_item</code></h2>
1824 <h4>referenced from <codecode></h4>
1825 <h4>appears in the <code>data</code> section</h4>
1862 <code>field_idx</code> in increasing order.
1870 <code>field_idx</code> in increasing order.
1876 <td>the defined direct (any of <code>static</code>, <code>private</code>,
1879 <code>method_idx</code> in increasing order.
1885 <td>the defined virtual (none of <code>static</code>, <code>private</code>,
1889 methods must be sorted by <code>method_idx</code> in increasing order.
1895 <p><b>Note:</b> All elements' <code>field_id</code>s and
1896 <code>method_id</code>s must refer to the same defining class.</p>
1898 <h3><code>encoded_field</code> Format</h3>
1912 <td>index into the <code>field_ids</code> list for the identity of this
1921 <td>access flags for the field (<code>public</code>, <code>final</code>,
1922 etc.). See "<code>access_flags</code> Definitions" for details.
1928 <h3><code>encoded_method</code> Format</h3>
1942 <td>index into the <code>method_ids</code> list for the identity of this
1951 <td>access flags for the method (<code>public</code>, <code>final</code>,
1952 etc.). See "<code>access_flags</code> Definitions" for details.
1958 <td>offset from the start of the file to the code structure for this
1959 method, or <code>0</code> if this method is either <code>abstract</code>
1960 or <code>native</code>. The offset should be to a location in the
1961 <code>data</code> section. The format of the data is specified by
1962 "<code>code_item</code>" below.
1968 <h2><code>type_list</code></h2>
1969 <h4>referenced from <code>class_def_item</code> and
1970 <code>proto_id_item</code></h4>
1971 <h4>appears in the <code>data</code> section</h4>
1996 <h3><code>type_item</code> Format</h3>
2010 <td>index into the <code>type_ids</code> list</td>
2015 <h2><code>code_item</code></h2>
2016 <h4>referenced from <code>method_item</code></h4>
2017 <h4>appears in the <code>data</code> section</h4>
2032 <td>the number of registers used by this code</td>
2038 code is for</td>
2044 code for method invocation
2050 <td>the number of <code>try_item</code>s for this instance. If non-zero,
2051 then these appear as the <code>tries</code> array just after the
2052 <code>insns</code> in this instance.
2059 local variable info) sequence for this code, or <code>0</code> if
2061 to a location in the <code>data</code> section. The format of
2062 the data is specified by "<code>debug_info_item</code>" below.
2068 <td>size of the instructions list, in 16-bit code units</td>
2073 <td>actual array of bytecode. The format of code in an <code>insns</code>
2076 that though this is defined as an array of <code>ushort</code>, there
2079 <i>only</i> done on individual <code>ushort</code>s and not on the
2086 <td>two bytes of padding to make <code>tries</code> four-byte aligned.
2087 This element is only present if <code>tries_size</code> is non-zero
2088 and <code>insns_size</code> is odd.
2094 <td>array indicating where in the code exceptions may be caught and
2097 present if <code>tries_size</code> is non-zero.
2104 handler addresses. Each <code>try_item</code> has a byte-wise offset
2106 <code>tries_size</code> is non-zero.
2112 <h3><code>try_item</code> Format </h3>
2126 <td>start address of the block of code covered by this entry. The address
2127 is a count of 16-bit code units to the start of the first covered
2134 <td>number of 16-bit code units covered by this entry. The last code
2135 unit covered (inclusive) is <code>start_addr + insn_count - 1</code>.
2142 to the <code>catch_handler_item</code> for this entry
2148 <h3><code>encoded_catch_handler_list</code> Format</h3>
2173 <h3><code>encoded_catch_handler</code> Format</h3>
2189 by a catch-all handler. For example: A <code>size</code> of <code>0</code>
2191 A <code>size</code> of <code>2</code> means that there are two explicitly
2192 typed catches and no catch-all. And a <code>size</code> of <code>-1</code>
2199 <td>stream of <code>abs(size)</code> encoded items, one for each caught
2207 present if <code>size</code> is non-positive.
2213 <h3><code>encoded_type_addr_pair</code> Format</h3>
2227 <td>index into the <code>type_ids</code> list for the type of the
2239 <h2><code>debug_info_item</code></h2>
2240 <h4>referenced from <code>code_item</code></h4>
2241 <h4>appears in the <code>data</code> section</h4>
2244 <p>Each <code>debug_info_item</code> defines a DWARF3-inspired byte-coded
2247 <code>code_item</code>. The sequence begins with a variable-length
2250 with an <code>DBG_END_SEQUENCE</code> byte.</p>
2253 <code>address</code> register represents the instruction offset in the
2254 associated <code>insns_item</code> in 16-bit code units. The
2255 <code>address</code> register starts at <code>0</code> at the beginning of each
2256 <code>debug_info</code> sequence and may only monotonically increase.
2257 The <code>line</code> register represents what source line number
2261 <code>1</code>. The <code>source_file</code> register represents the
2263 the value of <code>source_file_idx</code> in <code>class_def_item</code>.
2264 The other two variables, <code>prologue_end</code> and
2265 <code>epilogue_begin</code>, are boolean flags (initialized to
2266 <code>false</code>) that indicate whether the next position emitted
2269 each register for the <code>DBG_RESTART_LOCAL</code> code.</p>
2285 <td>the initial value for the state machine's <code>line</code> register.
2293 one per method parameter, excluding an instance method's <code>this</code>,
2301 <code>NO_INDEX</code> indicates that no name
2309 <p>The byte code values are as follows:</p>
2327 <td>terminates a debug info sequence for a <code>code_item</code></td>
2333 <td><code>addr_diff</code>: amount to add to address register</td>
2340 <td><code>line_diff</code>: amount to change line register by</td>
2350 <td><code>register_num</code>: register that will contain local<br/>
2351 <code>name_idx</code>: string index of the name<br/>
2352 <code>type_idx</code>: type index of the type
2355 <code>name_idx</code> or <code>type_idx</code> may be
2356 <code>NO_INDEX</code> to indicate that that value is unknown.
2367 <td><code>register_num</code>: register that will contain local<br/>
2368 <code>name_idx</code>: string index of the name<br/>
2369 <code>type_idx</code>: type index of the type<br/>
2370 <code>sig_idx</code>: string index of the type signature
2373 Any of <code>name_idx</code>, <code>type_idx</code>, or
2374 <code>sig_idx</code> may be <code>NO_INDEX</code>
2375 to indicate that that value is unknown. (If <code>sig_idx</code> is
2376 <code>-1</code>, though, the same data could be represented more
2377 efficiently using the opcode <code>DBG_START_LOCAL</code>.)
2379 "<code>dalvik.annotation.Signature</code>" below for caveats about
2387 <td><code>register_num</code>: register that contained local</td>
2396 <td><code>register_num</code>: register to restart</td>
2407 <td>sets the <code>prologue_end</code> state machine register,
2410 a method breakpoint). The <code>prologue_end</code> register is
2411 cleared by any special (<code>>= 0x0a</code>) opcode.
2419 <td>sets the <code>epilogue_begin</code> state machine register,
2423 The <code>epilogue_begin</code> register is cleared by any special
2424 (<code>>= 0x0a</code>) opcode.
2431 <td><code>name_idx</code>: string index of source file name;
2432 <code>NO_INDEX</code> if unknown
2436 <code>code_item</code>
2446 <td>advances the <code>line</code> and <code>address</code> registers,
2447 emits a position entry, and clears <code>prologue_end</code> and
2448 <code>epilogue_begin</code>. See below for description.
2456 <p>Opcodes with values between <code>0x0a</code> and <code>0xff</code>
2457 (inclusive) move both the <code>line</code> and <code>address</code>
2472 <h2><code>annotations_directory_item</code></h2>
2473 <h4>referenced from <code>class_def_item</code></h4>
2474 <h4>appears in the <code>data</code> section</h4>
2490 on the class, or <code>0</code> if the class has no direct annotations.
2492 <code>data</code> section. The format of the data is specified
2493 by "<code>annotation_set_item</code>" below.
2515 be sorted in increasing order, by <code>field_idx</code>.
2522 be sorted in increasing order, by <code>method_idx</code>.
2529 list must be sorted in increasing order, by <code>method_idx</code>.
2535 <p><b>Note:</b> All elements' <code>field_id</code>s and
2536 <code>method_id</code>s must refer to the same defining class.</p>
2538 <h3><code>field_annotation</code> Format</h3>
2552 <td>index into the <code>field_ids</code> list for the identity of the
2560 the field. The offset should be to a location in the <code>data</code>
2562 "<code>annotation_set_item</code>" below.
2568 <h3><code>method_annotation</code> Format</h3>
2582 <td>index into the <code>method_ids</code> list for the identity of the
2591 <code>data</code> section. The format of the data is specified by
2592 "<code>annotation_set_item</code>" below.
2598 <h3><code>parameter_annotation</code> Format</h2>
2612 <td>index into the <code>method_ids</code> list for the identity of the
2621 <code>data</code> section. The format of the data is specified by
2622 "<code>annotation_set_ref_list</code>" below.
2628 <h2><code>annotation_set_ref_list</code></h2>
2629 <h4>referenced from <code>parameter_annotations_item</code></h4>
2630 <h4>appears in the <code>data</code> section</h4>
2655 <h3><code>annotation_set_ref_item</code> Format</h3>
2670 or <code>0</code> if there are no annotations for this element.
2671 The offset, if non-zero, should be to a location in the <code>data</code>
2673 "<code>annotation_set_item</code>" below.
2679 <h2><code>annotation_set_item</code></h2>
2680 <h4>referenced from <code>annotations_directory_item</code>,
2681 <code>field_annotations_item</code>,
2682 <code>method_annotations_item</code>, and
2683 <code>annotation_set_ref_item</code></h4>
2684 <h4>appears in the <code>data</code> section</h4>
2705 by <code>type_idx</code>.
2711 <h3><code>annotation_off_item</code> Format</h3>
2726 The offset should be to a location in the <code>data</code> section,
2728 "<code>annotation_item</code>" below.
2735 <h2><code>annotation_item</code></h2>
2736 <h4>referenced from <code>annotation_set_item</code></h4>
2737 <h4>appears in the <code>data</code> section</h4>
2758 "<code>encoded_annotation</code> Format" under
2759 "<code>encoded_value</code> Encoding" above.
2767 <p>These are the options for the <code>visibility</code> field in an
2768 <code>annotation_item</code>:</p>
2783 of other code)
2795 (and not to regular user code)
2801 <h2><code>encoded_array_item</code></h2>
2802 <h4>referenced from <code>class_def_item</code></h4>
2803 <h4>appears in the <code>data</code> section</h4>
2819 by "<code>encoded_array</code> Format" under "<code>encoded_value</code>
2830 generally only accessed indirectly by client (non-system) code.</p>
2832 <p>System annotations are represented in <code>.dex</code> files as
2833 annotations with visibility set to <code>VISIBILITY_SYSTEM</code>.
2835 <h2><code>dalvik.annotation.AnnotationDefault</code></h2>
2838 <p>An <code>AnnotationDefault</code> annotation is attached to each
2861 <h2><code>dalvik.annotation.EnclosingClass</code></h2>
2864 <p>An <code>EnclosingClass</code> annotation is attached to each class
2868 <code>InnerClass</code> annotation. Additionally, a class may not have
2869 both an <code>EnclosingClass</code> and an
2870 <code>EnclosingMethod</code> annotation.</p>
2889 <h2><code>dalvik.annotation.EnclosingMethod</code></h2>
2892 <p>An <code>EnclosingMethod</code> annotation is attached to each class
2894 annotation must also have an <code>InnerClass</code> annotation.
2895 Additionally, a class may not have both an <code>EnclosingClass</code>
2896 and an <code>EnclosingMethod</code> annotation.</p>
2915 <h2><code>dalvik.annotation.InnerClass</code></h2>
2918 <p>An <code>InnerClass</code> annotation is attached to each class
2921 <code>EnclosingClass</code> annotation <i>or</i> an
2922 <code>EnclosingMethod</code> annotation.</p>
2938 <code>null</code>.
2952 <h2><code>dalvik.annotation.MemberClasses</code></h2>
2955 <p>A <code>MemberClasses</code> annotation is attached to each class
2976 <h2><code>dalvik.annotation.Signature</code></h2>
2979 <p>A <code>Signature</code> annotation is attached to each class,
2981 than is representable by a <code>type_id_item</code>. The
2982 <code>.dex</code> format does not define the format for signatures; it
2994 a <code>Signature</code> annotation is defined as an <i>array</i> of
2999 tools that generate <code>.dex</code> files.</p>
3019 <h2><code>dalvik.annotation.Throws</code></h2>
3022 <p>A <code>Throws</code> annotation is attached to each method which is