Struct dex::Dex [−][src]
pub struct Dex<T> { /* fields omitted */ }
Expand description
Represents a Dex file
Implementations
impl<T> Dex<T> where
T: AsRef<[u8]>,
[src]
impl<T> Dex<T> where
T: AsRef<[u8]>,
[src]pub fn map_list(&self) -> &MapList
[src]
pub fn get_source_file(&self, file_id: StringId) -> Result<Option<DexString>>
[src]
pub fn get_source_file(&self, file_id: StringId) -> Result<Option<DexString>>
[src]Source file name in which a class is defined.
pub fn get_string(&self, string_id: StringId) -> Result<DexString>
[src]
pub fn get_string(&self, string_id: StringId) -> Result<DexString>
[src]Returns a reference to the DexString
represented by the given id.
pub fn get_type_from_descriptor(&self, descriptor: &str) -> Result<Option<Type>>
[src]
pub fn get_type_from_descriptor(&self, descriptor: &str) -> Result<Option<Type>>
[src]Returns the Type
corresponding to the descriptor.
pub fn get_type(&self, type_id: TypeId) -> Result<Type>
[src]
pub fn get_type(&self, type_id: TypeId) -> Result<Type>
[src]Returns the Type
represented by the give type_id.
pub fn find_class_by_name(&self, type_descriptor: &str) -> Result<Option<Class>>
[src]
pub fn find_class_by_name(&self, type_descriptor: &str) -> Result<Option<Class>>
[src]Finds Class
by the given class name. The name should be in smali format.
This method uses binary search to find the class definition using the property
that the strings, type ids and class defs sections are in sorted.
pub fn get_interfaces(&self, offset: uint) -> Result<Vec<Type>>
[src]
pub fn get_interfaces(&self, offset: uint) -> Result<Vec<Type>>
[src]Returns the list of types which represent the interfaces of a class.
pub fn get_field_item(&self, field_id: FieldId) -> Result<FieldIdItem>
[src]
pub fn get_field_item(&self, field_id: FieldId) -> Result<FieldIdItem>
[src]Returns the FieldIdItem
represented by a FieldId
.
pub fn get_proto_item(&self, proto_id: ProtoId) -> Result<ProtoIdItem>
[src]
pub fn get_proto_item(&self, proto_id: ProtoId) -> Result<ProtoIdItem>
[src]Returns the ProtoIdItem
represented by ProtoId
.
pub fn get_method_item(&self, method_id: MethodId) -> Result<MethodIdItem>
[src]
pub fn get_method_item(&self, method_id: MethodId) -> Result<MethodIdItem>
[src]Returns the MethodIdItem
represented by MethodId
.
pub fn get_field(
&self,
encoded_field: &EncodedField,
initial_value: Option<EncodedValue>,
annotations: AnnotationSetItem
) -> Result<Field>
[src]
pub fn get_field(
&self,
encoded_field: &EncodedField,
initial_value: Option<EncodedValue>,
annotations: AnnotationSetItem
) -> Result<Field>
[src]Returns a Field
given its component items.
pub fn get_method(
&self,
encoded_method: &EncodedMethod,
method_annotations: AnnotationSetItem,
parameter_annotations: AnnotationSetRefList
) -> Result<Method>
[src]
pub fn get_method(
&self,
encoded_method: &EncodedMethod,
method_annotations: AnnotationSetItem,
parameter_annotations: AnnotationSetRefList
) -> Result<Method>
[src]Returns a Method
given its component items.
pub fn get_class_data(&self, offset: uint) -> Result<Option<ClassDataItem>>
[src]
pub fn get_class_data(&self, offset: uint) -> Result<Option<ClassDataItem>>
[src]Returns the ClassDataItem
at the given offset.
pub fn get_method_handle_item(
&self,
method_handle_id: MethodHandleId
) -> Result<MethodHandleItem>
[src]
pub fn get_method_handle_item(
&self,
method_handle_id: MethodHandleId
) -> Result<MethodHandleItem>
[src]Returns the MethodHandleItem
represented by the MethodHandleId
.
pub fn get_endian(&self) -> Endian
[src]
pub fn get_endian(&self) -> Endian
[src]Returns the endianness in the header section.
pub fn class_defs(&self) -> impl Iterator<Item = Result<ClassDefItem>> + '_
[src]
pub fn class_defs(&self) -> impl Iterator<Item = Result<ClassDefItem>> + '_
[src]Iterator over the class_defs section.
pub fn types(&self) -> impl Iterator<Item = Result<Type>> + '_
[src]
pub fn types(&self) -> impl Iterator<Item = Result<Type>> + '_
[src]Iterator over the type_ids section.
pub fn proto_ids(&self) -> impl Iterator<Item = Result<ProtoIdItem>> + '_
[src]
pub fn proto_ids(&self) -> impl Iterator<Item = Result<ProtoIdItem>> + '_
[src]Iterator over the proto_ids section.
pub fn field_ids(&self) -> impl Iterator<Item = Result<FieldIdItem>> + '_
[src]
pub fn field_ids(&self) -> impl Iterator<Item = Result<FieldIdItem>> + '_
[src]Iterator over the field_ids section.
pub fn method_ids(&self) -> impl Iterator<Item = Result<MethodIdItem>> + '_
[src]
pub fn method_ids(&self) -> impl Iterator<Item = Result<MethodIdItem>> + '_
[src]Iterator over the method_ids section.
pub fn method_handles(
&self
) -> impl Iterator<Item = Result<MethodHandleItem>> + '_
[src]
pub fn method_handles(
&self
) -> impl Iterator<Item = Result<MethodHandleItem>> + '_
[src]Iterator over the method_handles section.
pub fn get_code_item(&self, code_off: ulong) -> Result<Option<CodeItem>>
[src]
pub fn get_code_item(&self, code_off: ulong) -> Result<Option<CodeItem>>
[src]Returns the CodeItem
at the offset.
pub fn get_annotation_item(
&self,
annotation_off: uint
) -> Result<AnnotationItem>
[src]
pub fn get_annotation_item(
&self,
annotation_off: uint
) -> Result<AnnotationItem>
[src]Returns the AnnotationItem
at the offset.
pub fn get_annotation_set_item(
&self,
annotation_set_item_off: uint
) -> Result<AnnotationSetItem>
[src]
pub fn get_annotation_set_item(
&self,
annotation_set_item_off: uint
) -> Result<AnnotationSetItem>
[src]Returns the AnnotationSetItem
at the offset.
pub fn get_annotation_set_ref_list(
&self,
annotation_set_ref_list_off: uint
) -> Result<AnnotationSetRefList>
[src]
pub fn get_annotation_set_ref_list(
&self,
annotation_set_ref_list_off: uint
) -> Result<AnnotationSetRefList>
[src]Returns the AnnotationSetRefList
at the offset.
pub fn get_static_values(&self, static_values_off: uint) -> Result<EncodedArray>
[src]
pub fn get_static_values(&self, static_values_off: uint) -> Result<EncodedArray>
[src]Returns the EncodedArray
representing the static values of a class at the given offset.
pub fn get_annotations_directory_item(
&self,
annotations_directory_item_off: uint
) -> Result<AnnotationsDirectoryItem>
[src]
pub fn get_annotations_directory_item(
&self,
annotations_directory_item_off: uint
) -> Result<AnnotationsDirectoryItem>
[src]Returns the AnnotationsDirectoryItem
at the offset.
pub fn get_debug_info_item(&self, debug_info_off: uint) -> Result<DebugInfoItem>
[src]
pub fn get_debug_info_item(&self, debug_info_off: uint) -> Result<DebugInfoItem>
[src]Returns the DebugInfoItem
at the offset.