LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
LIEF::DEX::Method Class Reference

Class which represents a DEX::Method. More...

#include <Method.hpp>

Inheritance diagram for LIEF::DEX::Method:
Collaboration diagram for LIEF::DEX::Method:

Public Types

using access_flags_list_t = std::vector<ACCESS_FLAGS>
 
using bytecode_t = std::vector<uint8_t>
 
- 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

 Method ()
 
 Method (std::string name, Class *parent=nullptr)
 
 Method (const Method &)
 
Methodoperator= (const Method &)
 
const std::string & name () const
 Name of the Method.
 
bool has_class () const
 True if a class is associated with this method.
 
const Classcls () const
 DEX::Class associated with this Method or a nullptr if not resolved.
 
Classcls ()
 
uint64_t code_offset () const
 Offset to the Dalvik Bytecode.
 
const bytecode_tbytecode () const
 Dalvik Bytecode as bytes.
 
size_t index () const
 Index in the DEX Methods pool.
 
bool is_virtual () const
 True if this method is a virtual one. i.e. not static, private, finale or constructor.
 
const Prototypeprototype () const
 Method's prototype or a nullptr if it is not resolved.
 
Prototypeprototype ()
 
void insert_dex2dex_info (uint32_t pc, uint32_t index)
 
void accept (Visitor &visitor) const override
 
const dex2dex_method_info_tdex2dex_info () const
 
bool has (ACCESS_FLAGS f) const
 Check if the current method has the given ACCESS_FLAGS.
 
access_flags_list_t access_flags () const
 ACCESS_FLAGS as an std::set.
 
 ~Method () override
 
- Public Member Functions inherited from LIEF::Object
 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
 
virtual ~Object ()
 

Detailed Description

Class which represents a DEX::Method.

Member Typedef Documentation

◆ access_flags_list_t

◆ bytecode_t

using LIEF::DEX::Method::bytecode_t = std::vector<uint8_t>

Constructor & Destructor Documentation

◆ Method() [1/3]

LIEF::DEX::Method::Method ( )

◆ Method() [2/3]

LIEF::DEX::Method::Method ( std::string name,
Class * parent = nullptr )

◆ Method() [3/3]

LIEF::DEX::Method::Method ( const Method & )

◆ ~Method()

LIEF::DEX::Method::~Method ( )
override

Member Function Documentation

◆ accept()

void LIEF::DEX::Method::accept ( Visitor & visitor) const
overridevirtual

Implements LIEF::Object.

◆ access_flags()

access_flags_list_t LIEF::DEX::Method::access_flags ( ) const

ACCESS_FLAGS as an std::set.

◆ bytecode()

const bytecode_t & LIEF::DEX::Method::bytecode ( ) const

Dalvik Bytecode as bytes.

◆ cls() [1/2]

Class * LIEF::DEX::Method::cls ( )

◆ cls() [2/2]

const Class * LIEF::DEX::Method::cls ( ) const

DEX::Class associated with this Method or a nullptr if not resolved.

◆ code_offset()

uint64_t LIEF::DEX::Method::code_offset ( ) const

Offset to the Dalvik Bytecode.

◆ dex2dex_info()

const dex2dex_method_info_t & LIEF::DEX::Method::dex2dex_info ( ) const

◆ has()

bool LIEF::DEX::Method::has ( ACCESS_FLAGS f) const

Check if the current method has the given ACCESS_FLAGS.

◆ has_class()

bool LIEF::DEX::Method::has_class ( ) const

True if a class is associated with this method.

◆ index()

size_t LIEF::DEX::Method::index ( ) const

Index in the DEX Methods pool.

◆ insert_dex2dex_info()

void LIEF::DEX::Method::insert_dex2dex_info ( uint32_t pc,
uint32_t index )

◆ is_virtual()

bool LIEF::DEX::Method::is_virtual ( ) const

True if this method is a virtual one. i.e. not static, private, finale or constructor.

◆ name()

const std::string & LIEF::DEX::Method::name ( ) const

Name of the Method.

◆ operator=()

Method & LIEF::DEX::Method::operator= ( const Method & )

◆ prototype() [1/2]

Prototype * LIEF::DEX::Method::prototype ( )

◆ prototype() [2/2]

const Prototype * LIEF::DEX::Method::prototype ( ) const

Method's prototype or a nullptr if it is not resolved.


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