Go to the documentation of this file.
16#ifndef LIEF_DEX_PARSER_H
17#define LIEF_DEX_PARSER_H
22#include <unordered_map>
40 static std::unique_ptr<File>
parse(
const std::string& file);
43 static std::unique_ptr<File>
parse(std::vector<uint8_t> data,
const std::string& name =
"");
50 Parser(
const std::string& file);
51 Parser(std::vector<uint8_t> data);
54 void init(
const std::string& name, dex_version_t version);
56 template<
typename DEX_T>
59 template<
typename DEX_T>
62 template<
typename DEX_T>
65 template<
typename DEX_T>
68 template<
typename DEX_T>
71 template<
typename DEX_T>
74 template<
typename DEX_T>
75 void parse_prototypes();
77 template<
typename DEX_T>
80 template<
typename DEX_T>
83 template<
typename DEX_T>
84 void parse_class_data(uint32_t offset, Class& cls);
86 template<
typename DEX_T>
87 void parse_field(
size_t index, Class& cls,
bool is_static);
89 template<
typename DEX_T>
90 void parse_method(
size_t index, Class& cls,
bool is_virtual);
92 template<
typename DEX_T>
93 void parse_code_info(uint32_t offset, Method& method);
95 void resolve_inheritance();
97 void resolve_external_methods();
99 void resolve_external_fields();
101 void resolve_types();
103 std::unique_ptr<File> file_;
107 std::unordered_multimap<std::string, Class*> inheritance_;
111 std::unordered_multimap<std::string, Method*> class_method_map_;
115 std::unordered_multimap<std::string, Field*> class_field_map_;
117 std::unordered_multimap<std::string, Type*> class_type_map_;
119 std::unique_ptr<VectorStream> stream_;
Class which represents a DEX Class (i.e. a Java/Kotlin class)
Definition DEX/Class.hpp:36
Class which represent a DEX Field.
Definition Field.hpp:34
Class that represents a DEX file.
Definition DEX/File.hpp:39
Class which represents a DEX::Method.
Definition DEX/Method.hpp:36
Class which parses a DEX file to produce a DEX::File object.
Definition DEX/Parser.hpp:38
static std::unique_ptr< File > parse(std::vector< uint8_t > data, const std::string &name="")
static std::unique_ptr< File > parse(const std::string &file)
Parse the DEX file from the file path given in parameter.
Parser(const Parser ©)=delete
Parser & operator=(const Parser ©)=delete
Class which represents a DEX type as described in the format specifications: https://source....
Definition DEX/Type.hpp:33
Definition VectorStream.hpp:29
Definition DEX/Class.hpp:30
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41