pub struct DexFile {
pub header: DexHeader,
pub strings: DexStrings,
pub types: DexTypes,
pub protos: DexProtos,
pub fields: DexFields,
pub methods: DexMethods,
pub classes: DexClasses,
}Expand description
Representation of a DEX file
Fields§
§header: DexHeaderHeader of the file
strings: DexStringsList of strings defined in the DEX file
types: DexTypesList of types defined in the DEX file
protos: DexProtosList of prototypes defined in the DEX file
fields: DexFieldsList of class fields defined in the DEX file
methods: DexMethodsList of methods defined in the DEX file
classes: DexClassesList of classes defined in the DEX file
Implementations§
Source§impl DexFile
impl DexFile
Sourcepub fn build(dex_reader: DexReader) -> Result<Self, DexError>
pub fn build(dex_reader: DexReader) -> Result<Self, DexError>
Parse a DEX file from the reader and create a DexFile object
Sourcepub fn merge(readers: Vec<DexReader>) -> Result<Self, DexError>
pub fn merge(readers: Vec<DexReader>) -> Result<Self, DexError>
Create a DexFile from a collection of DexReader.
This function will create an intermediary DexFile object for each reader and then merge
them into the final DexFile.
Sourcepub fn get_classes_names(&self) -> Vec<&String>
pub fn get_classes_names(&self) -> Vec<&String>
Returns a vector containing the names of all the classes defined in the DEX file
Sourcepub fn get_class_def(&self, class_name: &String) -> Option<&ClassDefItem>
pub fn get_class_def(&self, class_name: &String) -> Option<&ClassDefItem>
Get the ClassDefItem object for a given class name
Sourcepub fn get_methods_for_class(&self, class_name: &String) -> Vec<&EncodedMethod>
pub fn get_methods_for_class(&self, class_name: &String) -> Vec<&EncodedMethod>
Get the method of a given class as a vector of EncodedMethod objects
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DexFile
impl RefUnwindSafe for DexFile
impl Send for DexFile
impl Sync for DexFile
impl Unpin for DexFile
impl UnwindSafe for DexFile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more