tempBuffer.order(ByteOrder.LITTLE_ENDIAN); for (ClassKey key: classSection.getSortedClasses()) {
HashMap<List<? extends AnnotationSetKey>, Integer> internedItems = Maps.newHashMap(); for (ClassKey classKey: classSection.getSortedClasses()) { for (MethodKey methodKey: classSection.getSortedMethods(classKey)) { List<? extends AnnotationSetKey> parameterAnnotations = classSection.getParameterAnnotations(methodKey);
for (ClassKey classKey: classSection.getSortedClasses()) { Collection<? extends MethodKey> directMethods = classSection.getSortedDirectMethods(classKey); Collection<? extends MethodKey> virtualMethods = classSection.getSortedVirtualMethods(classKey);
private void writeEncodedArrays(@Nonnull DexDataWriter writer) throws IOException { InternalEncodedValueWriter encodedValueWriter = new InternalEncodedValueWriter(writer); encodedArraySectionOffset = writer.getPosition(); HashMap<EncodedArrayKey<EncodedValue>, Integer> internedItems = Maps.newHashMap(); EncodedArrayKey<EncodedValue> key = new EncodedArrayKey<EncodedValue>(); for (ClassKey classKey: classSection.getSortedClasses()) { Collection <? extends EncodedValue> elements = classSection.getStaticInitializers(classKey); if (elements != null && elements.size() > 0) { key.elements = elements; Integer prev = internedItems.get(key); if (prev != null) { classSection.setEncodedArrayOffset(classKey, prev); } else { int offset = writer.getPosition(); internedItems.put(key, offset); classSection.setEncodedArrayOffset(classKey, offset); key = new EncodedArrayKey<EncodedValue>(); numEncodedArrayItems++; writer.writeUleb128(elements.size()); for (EncodedValue value: elements) { writeEncodedValue(encodedValueWriter, value); } } } } }
tempBuffer.order(ByteOrder.LITTLE_ENDIAN); for (ClassKey key: classSection.getSortedClasses()) {
private void writeAnnotationSetRefs(@Nonnull DexDataWriter writer) throws IOException { writer.align(); annotationSetRefSectionOffset = writer.getPosition(); HashMap<List<? extends AnnotationSetKey>, Integer> internedItems = Maps.newHashMap(); for (ClassKey classKey: classSection.getSortedClasses()) { for (MethodKey methodKey: classSection.getSortedMethods(classKey)) { List<? extends AnnotationSetKey> parameterAnnotations = classSection.getParameterAnnotations(methodKey); if (parameterAnnotations != null) { Integer prev = internedItems.get(parameterAnnotations); if (prev != null) { classSection.setAnnotationSetRefListOffset(methodKey, prev); } else { writer.align(); int position = writer.getPosition(); classSection.setAnnotationSetRefListOffset(methodKey, position); internedItems.put(parameterAnnotations, position); numAnnotationSetRefItems++; writer.writeInt(parameterAnnotations.size()); for (AnnotationSetKey annotationSetKey: parameterAnnotations) { if (annotationSetSection.getAnnotations(annotationSetKey).size() > 0) { writer.writeInt(annotationSetSection.getItemOffset(annotationSetKey)); } else { writer.writeInt(NO_OFFSET); } } } } } } }
tempBuffer.order(ByteOrder.LITTLE_ENDIAN); for (ClassKey key: classSection.getSortedClasses()) {
HashMap<List<? extends AnnotationSetKey>, Integer> internedItems = Maps.newHashMap(); for (ClassKey classKey: classSection.getSortedClasses()) { for (MethodKey methodKey: classSection.getSortedMethods(classKey)) { List<? extends AnnotationSetKey> parameterAnnotations = classSection.getParameterAnnotations(methodKey);
for (ClassKey classKey: classSection.getSortedClasses()) { Collection<? extends MethodKey> directMethods = classSection.getSortedDirectMethods(classKey); Collection<? extends MethodKey> virtualMethods = classSection.getSortedVirtualMethods(classKey);
for (ClassKey classKey: classSection.getSortedClasses()) { Collection<? extends MethodKey> directMethods = classSection.getSortedDirectMethods(classKey); Collection<? extends MethodKey> virtualMethods = classSection.getSortedVirtualMethods(classKey);