public abstract class DexWriter<StringKey extends java.lang.CharSequence,StringRef extends StringReference,TypeKey extends java.lang.CharSequence,TypeRef extends TypeReference,ProtoRefKey extends MethodProtoReference,FieldRefKey extends FieldReference,MethodRefKey extends MethodReference,ClassKey extends java.lang.Comparable<? super ClassKey>,CallSiteKey extends CallSiteReference,MethodHandleKey extends MethodHandleReference,AnnotationKey extends Annotation,AnnotationSetKey,TypeListKey,FieldKey,MethodKey,EncodedArrayKey,EncodedValue,AnnotationElement extends AnnotationElement,StringSectionType extends StringSection<StringKey,StringRef>,TypeSectionType extends TypeSection<StringKey,TypeKey,TypeRef>,ProtoSectionType extends ProtoSection<StringKey,TypeKey,ProtoRefKey,TypeListKey>,FieldSectionType extends FieldSection<StringKey,TypeKey,FieldRefKey,FieldKey>,MethodSectionType extends MethodSection<StringKey,TypeKey,ProtoRefKey,MethodRefKey,MethodKey>,ClassSectionType extends ClassSection<StringKey,TypeKey,TypeListKey,ClassKey,FieldKey,MethodKey,AnnotationSetKey,EncodedArrayKey>,CallSiteSectionType extends CallSiteSection<CallSiteKey,EncodedArrayKey>,MethodHandleSectionType extends MethodHandleSection<MethodHandleKey,FieldRefKey,MethodRefKey>,TypeListSectionType extends TypeListSection<TypeKey,TypeListKey>,AnnotationSectionType extends AnnotationSection<StringKey,TypeKey,AnnotationKey,AnnotationElement,EncodedValue>,AnnotationSetSectionType extends AnnotationSetSection<AnnotationKey,AnnotationSetKey>,EncodedArraySectionType extends EncodedArraySection<EncodedArrayKey,EncodedValue>>
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected class |
DexWriter.InternalEncodedValueWriter |
class |
DexWriter.SectionProvider |
| Modifier | Constructor and Description |
|---|---|
protected |
DexWriter(Opcodes opcodes) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
getFieldReferences() |
java.util.List<java.lang.String> |
getMethodReferences() |
protected abstract DexWriter.SectionProvider |
getSectionProvider() |
java.util.List<java.lang.String> |
getTypeReferences() |
boolean |
hasOverflowed()
Checks whether any of the size-sensitive constant pools have overflowed and have more than 64Ki entries.
|
boolean |
hasOverflowed(int maxPoolSize)
Checks whether any of the size-sensitive constant pools have more than the supplied maximum number of entries.
|
protected abstract void |
writeEncodedValue(DexWriter.InternalEncodedValueWriter writer,
EncodedValue encodedValue) |
void |
writeTo(DexDataStore dest) |
void |
writeTo(DexDataStore dest,
DeferredOutputStreamFactory tempFactory) |
public static final int NO_INDEX
public static final int NO_OFFSET
public static final int MAX_POOL_SIZE
protected final Opcodes opcodes
protected int stringIndexSectionOffset
protected int typeSectionOffset
protected int protoSectionOffset
protected int fieldSectionOffset
protected int methodSectionOffset
protected int classIndexSectionOffset
protected int callSiteSectionOffset
protected int methodHandleSectionOffset
protected int stringDataSectionOffset
protected int classDataSectionOffset
protected int typeListSectionOffset
protected int encodedArraySectionOffset
protected int annotationSectionOffset
protected int annotationSetSectionOffset
protected int annotationSetRefSectionOffset
protected int annotationDirectorySectionOffset
protected int debugSectionOffset
protected int codeSectionOffset
protected int mapSectionOffset
protected int numAnnotationSetRefItems
protected int numAnnotationDirectoryItems
protected int numDebugInfoItems
protected int numCodeItemItems
protected int numClassDataItems
public final StringSectionType extends StringSection<StringKey,StringRef> stringSection
public final TypeSectionType extends TypeSection<StringKey,TypeKey,TypeRef> typeSection
public final ProtoSectionType extends ProtoSection<StringKey,TypeKey,ProtoRefKey,TypeListKey> protoSection
public final FieldSectionType extends FieldSection<StringKey,TypeKey,FieldRefKey,FieldKey> fieldSection
public final MethodSectionType extends MethodSection<StringKey,TypeKey,ProtoRefKey,MethodRefKey,MethodKey> methodSection
public final ClassSectionType extends ClassSection<StringKey,TypeKey,TypeListKey,ClassKey,FieldKey,MethodKey,AnnotationSetKey,EncodedArrayKey> classSection
public final CallSiteSectionType extends CallSiteSection<CallSiteKey,EncodedArrayKey> callSiteSection
public final MethodHandleSectionType extends MethodHandleSection<MethodHandleKey,FieldRefKey,MethodRefKey> methodHandleSection
public final TypeListSectionType extends TypeListSection<TypeKey,TypeListKey> typeListSection
public final AnnotationSectionType extends AnnotationSection<StringKey,TypeKey,AnnotationKey,AnnotationElement,EncodedValue> annotationSection
public final AnnotationSetSectionType extends AnnotationSetSection<AnnotationKey,AnnotationSetKey> annotationSetSection
public final EncodedArraySectionType extends EncodedArraySection<EncodedArrayKey,EncodedValue> encodedArraySection
protected DexWriter(Opcodes opcodes)
@Nonnull protected abstract DexWriter.SectionProvider getSectionProvider()
protected abstract void writeEncodedValue(@Nonnull
DexWriter.InternalEncodedValueWriter writer,
@Nonnull
EncodedValue encodedValue)
throws java.io.IOException
java.io.IOException@Nonnull public java.util.List<java.lang.String> getMethodReferences()
@Nonnull public java.util.List<java.lang.String> getFieldReferences()
@Nonnull public java.util.List<java.lang.String> getTypeReferences()
public boolean hasOverflowed()
public boolean hasOverflowed(int maxPoolSize)
maxPoolSize - the maximum number of entries allowed in any of the size-sensitive constant poolspublic void writeTo(@Nonnull
DexDataStore dest)
throws java.io.IOException
java.io.IOExceptionpublic void writeTo(@Nonnull
DexDataStore dest,
@Nonnull
DeferredOutputStreamFactory tempFactory)
throws java.io.IOException
java.io.IOException