Package org.jf.dexlib2.formatter
Class DexFormattedWriter
java.lang.Object
java.io.Writer
org.jf.dexlib2.formatter.DexFormattedWriter
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
- Direct Known Subclasses:
BaksmaliWriter
This class handles formatting and writing various types of items in a dex file to a Writer.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappend(char c) append(CharSequence csq) append(CharSequence csq, int start, int end) voidclose()voidflush()voidwrite(char[] cbuf) voidwrite(char[] cbuf, int off, int len) voidwrite(int c) voidvoidprotected voidwriteAnnotation(AnnotationEncodedValue annotation) Write the givenAnnotationEncodedValue.protected voidwriteArray(ArrayEncodedValue array) Write the givenArrayEncodedValue.voidwriteCallSite(CallSiteReference callSiteReference) Write the givenCallSiteReference.protected voidwriteClass(CharSequence type) voidwriteEncodedValue(EncodedValue encodedValue) Write the givenEncodedValue.voidwriteFieldDescriptor(FieldReference fieldReference) Write the field descriptor for the givenFieldReference.voidwriteMethodDescriptor(MethodReference methodReference) Write the method descriptor for the givenMethodReference.voidwriteMethodHandle(MethodHandleReference methodHandleReference) Write the givenMethodHandleReference.voidwriteMethodProtoDescriptor(MethodProtoReference protoReference) Write the method proto descriptor for the givenMethodProtoReference.voidwriteQuotedString(CharSequence charSequence) Write the given quoted string.voidwriteReference(Reference reference) Write the givenReference.voidwriteShortFieldDescriptor(FieldReference fieldReference) Write the short field descriptor for the givenFieldReference.voidwriteShortMethodDescriptor(MethodReference methodReference) Write the short method descriptor for the givenMethodReference.protected voidwriteSimpleName(CharSequence simpleName) Writes the given simple name.voidwriteType(CharSequence type) Write the given type.Methods inherited from class java.io.Writer
nullWriter
-
Field Details
-
writer
-
-
Constructor Details
-
DexFormattedWriter
-
-
Method Details
-
writeMethodDescriptor
Write the method descriptor for the givenMethodReference.- Throws:
IOException
-
writeShortMethodDescriptor
Write the short method descriptor for the givenMethodReference.The short method descriptor elides the class that the field is a member of.
- Throws:
IOException
-
writeMethodProtoDescriptor
Write the method proto descriptor for the givenMethodProtoReference.- Throws:
IOException
-
writeFieldDescriptor
Write the field descriptor for the givenFieldReference.- Throws:
IOException
-
writeShortFieldDescriptor
Write the short field descriptor for the givenFieldReference.The short field descriptor typically elides the class that the field is a member of.
- Throws:
IOException
-
writeMethodHandle
Write the givenMethodHandleReference.- Throws:
IOException
-
writeCallSite
Write the givenCallSiteReference.- Throws:
IOException
-
writeType
Write the given type.- Throws:
IOException
-
writeClass
- Throws:
IOException
-
writeSimpleName
Writes the given simple name.- Parameters:
simpleName- The simple name to write.- Throws:
IOException
-
writeQuotedString
Write the given quoted string.This includes the beginning and ending quotation marks, and the string value is be escaped as necessary.
- Throws:
IOException
-
writeEncodedValue
Write the givenEncodedValue.- Throws:
IOException
-
writeAnnotation
Write the givenAnnotationEncodedValue.- Throws:
IOException
-
writeArray
Write the givenArrayEncodedValue.- Throws:
IOException
-
writeReference
Write the givenReference.- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
write
- Specified by:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
append
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException
-
append
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException
-
append
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Specified by:
flushin classWriter- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-