Lines Matching refs:section
32 public final Section header = new Section(0x0000);
33 public final Section stringIds = new Section(0x0001);
34 public final Section typeIds = new Section(0x0002);
35 public final Section protoIds = new Section(0x0003);
36 public final Section fieldIds = new Section(0x0004);
37 public final Section methodIds = new Section(0x0005);
38 public final Section classDefs = new Section(0x0006);
39 public final Section callSiteIds = new Section(0x0007);
40 public final Section methodHandles = new Section(0x0008);
41 public final Section mapList = new Section(0x1000);
42 public final Section typeLists = new Section(0x1001);
43 public final Section annotationSetRefLists = new Section(0x1002);
44 public final Section annotationSets = new Section(0x1003);
45 public final Section classDatas = new Section(0x2000);
46 public final Section codes = new Section(0x2001);
47 public final Section stringDatas = new Section(0x2002);
48 public final Section debugInfos = new Section(0x2003);
49 public final Section annotations = new Section(0x2004);
50 public final Section encodedArrays = new Section(0x2005);
51 public final Section annotationsDirectories = new Section(0x2006);
52 public final Section[] sections = {
77 private void readHeader(Dex.Section headerIn) throws UnsupportedEncodingException {
123 private void readMap(Dex.Section in) throws IOException {
125 Section previous = null;
129 Section section = getSection(type);
133 if ((section.size != 0 && section.size != size)
134 || (section.off != -1 && section.off != offset)) {
138 section.size = size;
139 section.off = offset;
141 if (previous != null && previous.off > section.off) {
142 throw new DexException("Map is unsorted at " + previous + ", " + section);
145 previous = section;
153 Section section = sections[i];
154 if (section.off == -1) {
157 if (section.off > end) {
158 throw new DexException("Map is unsorted at " + section);
160 section.byteCount = end - section.off;
161 end = section.off;
165 private Section getSection(short type) {
166 for (Section section : sections) {
167 if (section.type == type) {
168 return section;
174 public void writeHeader(Dex.Section out, int api) throws IOException {
200 public void writeMap(Dex.Section out) throws IOException {
202 for (Section section : sections) {
203 if (section.exists()) {
209 for (Section section : sections) {
210 if (section.exists()) {
211 out.writeShort(section.type);
213 out.writeInt(section.size);
214 out.writeInt(section.off);
219 public static class Section implements Comparable<Section> {
225 public Section(int type) {
233 public int compareTo(Section section) {
234 if (off != section.off) {
235 return off < section.off ? -1 : 1;
241 return String.format("Section[type=%#x,off=%#x,size=%#x]", type, off, size);