16#ifndef LIEF_DEX_METHOD_H
17#define LIEF_DEX_METHOD_H
50 const std::string&
name()
const;
95 void set_virtual(
bool v);
99 Class* parent_ =
nullptr;
101 uint32_t access_flags_ = ACCESS_FLAGS::ACC_UNKNOWN;
102 uint32_t original_index_ = UINT_MAX;
103 bool is_virtual_ =
false;
105 uint64_t code_offset_ = 0;
106 std::vector<uint8_t> bytecode_;
Class which represents a DEX Class (i.e. a Java/Kotlin class)
Definition DEX/Class.hpp:35
Definition CodeInfo.hpp:33
Class which represents a DEX::Method.
Definition DEX/Method.hpp:36
void accept(Visitor &visitor) const override
std::vector< uint8_t > bytecode_t
Definition DEX/Method.hpp:42
friend std::ostream & operator<<(std::ostream &os, const Method &mtd)
const dex2dex_method_info_t & dex2dex_info() const
Method(std::string name, Class *parent=nullptr)
std::vector< ACCESS_FLAGS > access_flags_list_t
Definition DEX/Method.hpp:39
void insert_dex2dex_info(uint32_t pc, uint32_t index)
const bytecode_t & bytecode() const
Dalvik Bytecode as bytes.
bool is_virtual() const
True if this method is a virtual one. i.e. not static, private, finale or constructor.
const std::string & name() const
Name of the Method.
Method & operator=(const Method &)
const Class * cls() const
DEX::Class associated with this Method or a nullptr if not resolved.
access_flags_list_t access_flags() const
ACCESS_FLAGS as an std::set.
bool has(ACCESS_FLAGS f) const
Check if the current method has the given ACCESS_FLAGS.
size_t index() const
Index in the DEX Methods pool.
const Prototype * prototype() const
Method's prototype or a nullptr if it is not resolved.
bool has_class() const
True if a class is associated with this method.
uint64_t code_offset() const
Offset to the Dalvik Bytecode.
Class which parses a DEX file to produce a DEX::File object.
Definition DEX/Parser.hpp:38
Class which represents a DEX method prototype.
Definition Prototype.hpp:29
Definition Visitor.hpp:224
ACCESS_FLAGS
Definition DEX/enums.hpp:22
std::unordered_map< uint32_t, uint32_t > dex2dex_method_info_t
Definition deopt.hpp:27
LIEF namespace.
Definition Abstract/Binary.hpp:32
#define LIEF_API
Definition visibility.h:41