KUNAI Static Analyzer
Kunai is a library for doing static binary analysis of Dalvik.
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
KUNAI::DEX::Methods Class Reference

Methods contains all the MethodIDs from the DEX file. More...

#include <methods.hpp>

Public Member Functions

 Methods ()=default
 Constructor of Methods, default.
 
 ~Methods ()=default
 Destructor of Methods, default.
 
void parse_methods (stream::KunaiStream *stream, Types *types, Protos *protos, Strings *strings, std::uint32_t methods_offset, std::uint32_t methods_size)
 Parse all the method ids objects.
 
const std::vector< methodid_t > & get_methods () const
 Get a constant reference to all the methods.
 
std::vector< methodid_t > & get_methods ()
 Get a reference to all the methods.
 
MethodIDget_method (std::uint32_t pos)
 Get one of the methods by its position.
 
std::uint32_t get_number_of_methods () const
 Get the number of the methods.
 
void to_xml (std::ofstream &fos)
 Print the methods into an XML format.
 

Friends

std::ostream & operator<< (std::ostream &os, const Methods &entry)
 Give a pretty print result of the methods.
 

Detailed Description

Methods contains all the MethodIDs from the DEX file.

Member Function Documentation

◆ get_method()

MethodID * KUNAI::DEX::Methods::get_method ( std::uint32_t  pos)

Get one of the methods by its position.

Parameters
posposition in the vector
Returns
pointer to MethodID

◆ get_methods() [1/2]

std::vector< methodid_t > & KUNAI::DEX::Methods::get_methods ( )
inline

Get a reference to all the methods.

Returns
reference to vector of method ids

◆ get_methods() [2/2]

const std::vector< methodid_t > & KUNAI::DEX::Methods::get_methods ( ) const
inline

Get a constant reference to all the methods.

Returns
constant reference to vector of method ids

◆ get_number_of_methods()

std::uint32_t KUNAI::DEX::Methods::get_number_of_methods ( ) const
inline

Get the number of the methods.

Returns
value of methods_size

◆ parse_methods()

void KUNAI::DEX::Methods::parse_methods ( stream::KunaiStream stream,
Types types,
Protos protos,
Strings strings,
std::uint32_t  methods_offset,
std::uint32_t  methods_size 
)

Parse all the method ids objects.

Parameters
streamstream with the dex file
typestypes objects
stringsstrings objects
methods_offsetoffset to the ids of the methods
methods_sizenumber of methods to read

◆ to_xml()

void KUNAI::DEX::Methods::to_xml ( std::ofstream &  fos)

Print the methods into an XML format.

Parameters
fosfile where to dump it

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const Methods entry 
)
friend

Give a pretty print result of the methods.

Parameters
osstream where to print methods
entryentry to print
Returns
stream

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