Package org.jf.dexlib2.writer.pool
Class DexPool
java.lang.Object
org.jf.dexlib2.writer.DexWriter<CharSequence,StringReference,CharSequence,TypeReference,MethodProtoReference,FieldReference,MethodReference,PoolClassDef,CallSiteReference,MethodHandleReference,Annotation,Set<? extends Annotation>,TypeListPool.Key<? extends Collection<? extends CharSequence>>,Field,PoolMethod,ArrayEncodedValue,EncodedValue,AnnotationElement,StringPool,TypePool,ProtoPool,FieldPool,MethodPool,ClassPool,CallSitePool,MethodHandlePool,TypeListPool,AnnotationPool,AnnotationSetPool,EncodedArrayPool>
org.jf.dexlib2.writer.pool.DexPool
public class DexPool
extends DexWriter<CharSequence,StringReference,CharSequence,TypeReference,MethodProtoReference,FieldReference,MethodReference,PoolClassDef,CallSiteReference,MethodHandleReference,Annotation,Set<? extends Annotation>,TypeListPool.Key<? extends Collection<? extends CharSequence>>,Field,PoolMethod,ArrayEncodedValue,EncodedValue,AnnotationElement,StringPool,TypePool,ProtoPool,FieldPool,MethodPool,ClassPool,CallSitePool,MethodHandlePool,TypeListPool,AnnotationPool,AnnotationSetPool,EncodedArrayPool>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.jf.dexlib2.writer.DexWriter
DexWriter.InternalEncodedValueWriter, DexWriter.SectionProvider -
Field Summary
FieldsFields inherited from class org.jf.dexlib2.writer.DexWriter
annotationDirectorySectionOffset, annotationSection, annotationSectionOffset, annotationSetRefSectionOffset, annotationSetSection, annotationSetSectionOffset, callSiteSection, callSiteSectionOffset, classDataSectionOffset, classIndexSectionOffset, classSection, codeSectionOffset, debugSectionOffset, encodedArraySection, encodedArraySectionOffset, fieldSection, fieldSectionOffset, hasHiddenApiRestrictions, hiddenApiRestrictionsOffset, mapSectionOffset, MAX_POOL_SIZE, methodHandleSection, methodHandleSectionOffset, methodSection, methodSectionOffset, NO_INDEX, NO_OFFSET, numAnnotationDirectoryItems, numAnnotationSetRefItems, numClassDataItems, numCodeItemItems, numDebugInfoItems, opcodes, protoSection, protoSectionOffset, stringDataSectionOffset, stringIndexSectionOffset, stringSection, typeListSection, typeListSectionOffset, typeSection, typeSectionOffset -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DexWriter<CharSequence,StringReference, CharSequence, TypeReference, MethodProtoReference, FieldReference, MethodReference, PoolClassDef, CallSiteReference, MethodHandleReference, Annotation, Set<? extends Annotation>, TypeListPool.Key<? extends Collection<? extends CharSequence>>, Field, PoolMethod, ArrayEncodedValue, EncodedValue, AnnotationElement, StringPool, TypePool, ProtoPool, FieldPool, MethodPool, ClassPool, CallSitePool, MethodHandlePool, TypeListPool, AnnotationPool, AnnotationSetPool, EncodedArrayPool>.SectionProvider voidinternClass(ClassDef classDef) Interns a class into this DexPool(package private) voidinternEncodedValue(EncodedValue encodedValue) voidmark()Creates a marked state that can be returned to by calling reset() This is useful to rollback the last added class if it causes a method/field/type overflowvoidreset()Resets to the last marked state This is useful to rollback the last added class if it causes a method/field/type overflowprotected voidwriteEncodedValue(DexWriter<CharSequence, StringReference, CharSequence, TypeReference, MethodProtoReference, FieldReference, MethodReference, PoolClassDef, CallSiteReference, MethodHandleReference, Annotation, Set<? extends Annotation>, TypeListPool.Key<? extends Collection<? extends CharSequence>>, Field, PoolMethod, ArrayEncodedValue, EncodedValue, AnnotationElement, StringPool, TypePool, ProtoPool, FieldPool, MethodPool, ClassPool, CallSitePool, MethodHandlePool, TypeListPool, AnnotationPool, AnnotationSetPool, EncodedArrayPool>.InternalEncodedValueWriter writer, EncodedValue encodedValue) static voidstatic voidwriteTo(DexDataStore dataStore, DexFile input) Methods inherited from class org.jf.dexlib2.writer.DexWriter
getFieldReferences, getMethodReferences, getTypeReferences, hasOverflowed, hasOverflowed, writeTo, writeTo
-
Field Details
-
sections
-
-
Constructor Details
-
DexPool
-
-
Method Details
-
getSectionProvider
@Nonnull protected DexWriter<CharSequence,StringReference, getSectionProvider()CharSequence, TypeReference, MethodProtoReference, FieldReference, MethodReference, PoolClassDef, CallSiteReference, MethodHandleReference, Annotation, Set<? extends Annotation>, TypeListPool.Key<? extends Collection<? extends CharSequence>>, Field, PoolMethod, ArrayEncodedValue, EncodedValue, AnnotationElement, StringPool, TypePool, ProtoPool, FieldPool, MethodPool, ClassPool, CallSitePool, MethodHandlePool, TypeListPool, AnnotationPool, AnnotationSetPool, EncodedArrayPool>.SectionProvider - Specified by:
getSectionProviderin classDexWriter<CharSequence,StringReference, CharSequence, TypeReference, MethodProtoReference, FieldReference, MethodReference, PoolClassDef, CallSiteReference, MethodHandleReference, Annotation, Set<? extends Annotation>, TypeListPool.Key<? extends Collection<? extends CharSequence>>, Field, PoolMethod, ArrayEncodedValue, EncodedValue, AnnotationElement, StringPool, TypePool, ProtoPool, FieldPool, MethodPool, ClassPool, CallSitePool, MethodHandlePool, TypeListPool, AnnotationPool, AnnotationSetPool, EncodedArrayPool>
-
writeTo
public static void writeTo(@Nonnull DexDataStore dataStore, @Nonnull DexFile input) throws IOException - Throws:
IOException
-
writeTo
- Throws:
IOException
-
internClass
Interns a class into this DexPool- Parameters:
classDef- The class to intern
-
mark
public void mark()Creates a marked state that can be returned to by calling reset() This is useful to rollback the last added class if it causes a method/field/type overflow -
reset
public void reset()Resets to the last marked state This is useful to rollback the last added class if it causes a method/field/type overflow -
writeEncodedValue
protected void writeEncodedValue(@Nonnull DexWriter<CharSequence, StringReference, throws IOExceptionCharSequence, TypeReference, MethodProtoReference, FieldReference, MethodReference, PoolClassDef, CallSiteReference, MethodHandleReference, Annotation, Set<? extends Annotation>, TypeListPool.Key<? extends Collection<? extends CharSequence>>, Field, PoolMethod, ArrayEncodedValue, EncodedValue, AnnotationElement, StringPool, TypePool, ProtoPool, FieldPool, MethodPool, ClassPool, CallSitePool, MethodHandlePool, TypeListPool, AnnotationPool, AnnotationSetPool, EncodedArrayPool>.InternalEncodedValueWriter writer, @Nonnull EncodedValue encodedValue) - Specified by:
writeEncodedValuein classDexWriter<CharSequence,StringReference, CharSequence, TypeReference, MethodProtoReference, FieldReference, MethodReference, PoolClassDef, CallSiteReference, MethodHandleReference, Annotation, Set<? extends Annotation>, TypeListPool.Key<? extends Collection<? extends CharSequence>>, Field, PoolMethod, ArrayEncodedValue, EncodedValue, AnnotationElement, StringPool, TypePool, ProtoPool, FieldPool, MethodPool, ClassPool, CallSitePool, MethodHandlePool, TypeListPool, AnnotationPool, AnnotationSetPool, EncodedArrayPool> - Throws:
IOException
-
internEncodedValue
-