DexFile

Struct DexFile 

Source
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: DexHeader

Header of the file

§strings: DexStrings

List of strings defined in the DEX file

§types: DexTypes

List of types defined in the DEX file

§protos: DexProtos

List of prototypes defined in the DEX file

§fields: DexFields

List of class fields defined in the DEX file

§methods: DexMethods

List of methods defined in the DEX file

§classes: DexClasses

List of classes defined in the DEX file

Implementations§

Source§

impl DexFile

Source

pub fn build(dex_reader: DexReader) -> Result<Self, DexError>

Parse a DEX file from the reader and create a DexFile object

Source

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.

Source

pub fn get_classes_names(&self) -> Vec<&String>

Returns a vector containing the names of all the classes defined in the DEX file

Source

pub fn get_class_def(&self, class_name: &String) -> Option<&ClassDefItem>

Get the ClassDefItem object for a given class name

Source

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§

Source§

impl Debug for DexFile

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.