pub trait PrettyPrint {
// Required methods
fn method(&self, index: u16) -> (String, String, String, String);
fn field(&self, index: u16) -> (String, String, String);
fn string(&self, index: u32) -> String;
fn type_name(&self, index: u16) -> String;
// Provided method
fn print(&self, inst: &Instruction) -> String { ... }
}Expand description
Trait for pretty printing dalvik instructions such that they include method names, string literals, field names, etc.
The metadata required is usually in Dex metadata, for which this crate does not parse yet.
Required Methods§
Sourcefn method(&self, index: u16) -> (String, String, String, String)
fn method(&self, index: u16) -> (String, String, String, String)
Method lookup. Should return (Class, Name, Params, Return)
Sourcefn field(&self, index: u16) -> (String, String, String)
fn field(&self, index: u16) -> (String, String, String)
Field lookup. Should return (Class, Name, Type)
Provided Methods§
Sourcefn print(&self, inst: &Instruction) -> String
fn print(&self, inst: &Instruction) -> String
Pretty print the instruction
Newline is not added to the end.