Package org.jf.dexlib2.writer
Class EncodedValueWriter<StringKey,TypeKey,FieldRefKey extends FieldReference,MethodRefKey extends MethodReference,AnnotationElement extends AnnotationElement,ProtoRefKey,MethodHandleKey extends MethodHandleReference,EncodedValue>
java.lang.Object
org.jf.dexlib2.writer.EncodedValueWriter<StringKey,TypeKey,FieldRefKey,MethodRefKey,AnnotationElement,ProtoRefKey,MethodHandleKey,EncodedValue>
- Direct Known Subclasses:
DexWriter.InternalEncodedValueWriter
public abstract class EncodedValueWriter<StringKey,TypeKey,FieldRefKey extends FieldReference,MethodRefKey extends MethodReference,AnnotationElement extends AnnotationElement,ProtoRefKey,MethodHandleKey extends MethodHandleReference,EncodedValue>
extends Object
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AnnotationSection<StringKey, TypeKey, ?, AnnotationElement, EncodedValue> private final FieldSection<?, ?, FieldRefKey, ?> private final MethodHandleSection<MethodHandleKey, ?, ?> private final MethodSection<?, ?, ?, MethodRefKey, ?> private final ProtoSection<?, ?, ProtoRefKey, ?> private final StringSection<StringKey, ?> private final TypeSection<?, TypeKey, ?> private final DexDataWriter -
Constructor Summary
ConstructorsConstructorDescriptionEncodedValueWriter(DexDataWriter writer, StringSection<StringKey, ?> stringSection, TypeSection<?, TypeKey, ?> typeSection, FieldSection<?, ?, FieldRefKey, ?> fieldSection, MethodSection<?, ?, ?, MethodRefKey, ?> methodSection, ProtoSection<?, ?, ProtoRefKey, ?> protoSection, MethodHandleSection<MethodHandleKey, ?, ?> methodHandleSection, AnnotationSection<StringKey, TypeKey, ?, AnnotationElement, EncodedValue> annotationSection) -
Method Summary
Modifier and TypeMethodDescriptionvoidwriteAnnotation(TypeKey annotationType, Collection<? extends AnnotationElement> elements) voidwriteArray(Collection<? extends EncodedValue> elements) voidwriteBoolean(boolean value) voidwriteByte(byte value) voidwriteChar(char value) voidwriteDouble(double value) protected abstract voidwriteEncodedValue(EncodedValue encodedValue) voidwriteEnum(FieldRefKey value) voidwriteField(FieldRefKey value) voidwriteFloat(float value) voidwriteInt(int value) voidwriteLong(long value) voidwriteMethod(MethodRefKey value) voidwriteMethodHandle(MethodHandleKey value) voidwriteMethodType(ProtoRefKey value) voidvoidwriteShort(int value) voidwriteString(StringKey value) void
-
Field Details
-
writer
-
stringSection
-
typeSection
-
fieldSection
-
methodSection
-
protoSection
-
methodHandleSection
@Nonnull private final MethodHandleSection<MethodHandleKey extends MethodHandleReference,?, methodHandleSection?> -
annotationSection
@Nonnull private final AnnotationSection<StringKey,TypeKey, annotationSection?, AnnotationElement extends AnnotationElement, EncodedValue>
-
-
Constructor Details
-
EncodedValueWriter
public EncodedValueWriter(@Nonnull DexDataWriter writer, @Nonnull StringSection<StringKey, ?> stringSection, @Nonnull TypeSection<?, TypeKey, ?> typeSection, @Nonnull FieldSection<?, ?, FieldRefKey, ?> fieldSection, @Nonnull MethodSection<?, ?, ?, MethodRefKey, ?> methodSection, ProtoSection<?, ?, ProtoRefKey, ?> protoSection, MethodHandleSection<MethodHandleKey, ?, ?> methodHandleSection, @Nonnull AnnotationSection<StringKey, TypeKey, ?, AnnotationElement, EncodedValue> annotationSection)
-
-
Method Details
-
writeEncodedValue
- Throws:
IOException
-
writeAnnotation
public void writeAnnotation(TypeKey annotationType, Collection<? extends AnnotationElement> elements) throws IOException - Throws:
IOException
-
writeArray
- Throws:
IOException
-
writeBoolean
- Throws:
IOException
-
writeByte
- Throws:
IOException
-
writeChar
- Throws:
IOException
-
writeDouble
- Throws:
IOException
-
writeEnum
- Throws:
IOException
-
writeField
- Throws:
IOException
-
writeFloat
- Throws:
IOException
-
writeInt
- Throws:
IOException
-
writeLong
- Throws:
IOException
-
writeMethod
- Throws:
IOException
-
writeNull
- Throws:
IOException
-
writeShort
- Throws:
IOException
-
writeString
- Throws:
IOException
-
writeType
- Throws:
IOException
-
writeMethodType
- Throws:
IOException
-
writeMethodHandle
- Throws:
IOException
-