LIEF: Library to Instrument Executable Formats Version
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
LIEF::DEX::File Class Reference

Class that represents a DEX file. More...

#include <File.hpp>

Inheritance diagram for LIEF::DEX::File:
Inheritance graph
[legend]
Collaboration diagram for LIEF::DEX::File:
Collaboration graph
[legend]

Public Types

using classes_t = std::unordered_map< std::string, Class * >
 
using classes_list_t = std::vector< std::unique_ptr< Class > >
 
using it_classes = ref_iterator< classes_list_t &, Class * >
 
using it_const_classes = const_ref_iterator< const classes_list_t &, const Class * >
 
using methods_t = std::vector< std::unique_ptr< Method > >
 
using it_methods = ref_iterator< methods_t &, Method * >
 
using it_const_methods = const_ref_iterator< const methods_t &, const Method * >
 
using strings_t = std::vector< std::unique_ptr< std::string > >
 
using it_strings = ref_iterator< strings_t &, std::string * >
 
using it_const_strings = const_ref_iterator< const strings_t &, const std::string * >
 
using types_t = std::vector< std::unique_ptr< Type > >
 
using it_types = ref_iterator< types_t &, Type * >
 
using it_const_types = const_ref_iterator< const types_t &, const Type * >
 
using prototypes_t = std::vector< std::unique_ptr< Prototype > >
 
using it_prototypes = ref_iterator< prototypes_t &, Prototype * >
 
using it_const_prototypes = const_ref_iterator< const prototypes_t &, const Prototype * >
 
using fields_t = std::vector< std::unique_ptr< Field > >
 
using it_fields = ref_iterator< fields_t &, Field * >
 
using it_const_fields = const_ref_iterator< const fields_t &, const Field * >
 
- Public Types inherited from LIEF::Object
template<class T >
using output_t = add_pointer_t< decay_t< T > >
 
template<class T >
using output_const_t = add_pointer_t< add_const_t< decay_t< T > > >
 

Public Member Functions

Fileoperator= (const File &copy)=delete
 
 File (const File &copy)=delete
 
dex_version_t version () const
 Version of the current DEX file.
 
const std::string & name () const
 Name of this file.
 
void name (const std::string &name)
 
const std::string & location () const
 Location of this file.
 
void location (const std::string &location)
 
const Headerheader () const
 DEX header.
 
Headerheader ()
 
it_const_classes classes () const
 All classes used in the DEX file
 
it_classes classes ()
 
bool has_class (const std::string &class_name) const
 Check if the given class name exists.
 
const Classget_class (const std::string &class_name) const
 Return the DEX::Class object associated with the given name.
 
Classget_class (const std::string &class_name)
 
const Classget_class (size_t index) const
 Return the DEX::Class object associated with the given index.
 
Classget_class (size_t index)
 
dex2dex_info_t dex2dex_info () const
 De-optimize information.
 
std::string dex2dex_json_info () const
 De-optimize information as JSON.
 
it_const_methods methods () const
 Return an iterator over all the DEX::Method used in this DEX file.
 
it_methods methods ()
 
it_const_fields fields () const
 Return an iterator over all the DEX::Field used in this DEX file.
 
it_fields fields ()
 
it_const_strings strings () const
 String pool.
 
it_strings strings ()
 
it_const_types types () const
 Type pool.
 
it_types types ()
 
it_prototypes prototypes ()
 Prototype pool.
 
it_const_prototypes prototypes () const
 
const MapListmap () const
 DEX Map.
 
MapListmap ()
 
std::string save (const std::string &path="", bool deoptimize=true) const
 Extract the current dex file and deoptimize it.
 
std::vector< uint8_t > raw (bool deoptimize=true) const
 
void accept (Visitor &visitor) const override
 
- Public Member Functions inherited from LIEF::Object
 Object (const Object &other)
 
Objectoperator= (const Object &other)
 
template<class T >
output_t< T > as ()
 
template<class T >
output_const_t< T > as () const
 
virtual bool operator== (const Object &other) const
 
virtual bool operator!= (const Object &other) const
 

Detailed Description

Class that represents a DEX file.

Member Function Documentation

◆ accept()

void LIEF::DEX::File::accept ( Visitor visitor) const
overridevirtual

Implements LIEF::Object.


The documentation for this class was generated from the following file: