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::Fields Class Reference

Fields will contain all the FieldID from the DEX file. More...

#include <fields.hpp>

Public Member Functions

 Fields ()=default
 Constructor of Fields, default.
 
 ~Fields ()=default
 Destructor of Fields, default.
 
void parse_fields (stream::KunaiStream *stream, Types *types, Strings *strings, std::uint32_t fields_offset, std::uint32_t fields_size)
 Parse all the field ids objects.
 
const std::vector< fieldid_t > & get_fields () const
 Get a constant reference to all the fields.
 
std::vector< fieldid_t > & get_fields ()
 Get a reference to all the fields.
 
FieldIDget_field (std::uint32_t pos)
 Get one of the fields by its position.
 
std::uint32_t get_number_of_fields () const
 Get the number of the fields.
 
void to_xml (std::ofstream &fos)
 Print the fields into an XML format.
 

Friends

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

Detailed Description

Fields will contain all the FieldID from the DEX file.

Member Function Documentation

◆ get_field()

FieldID * KUNAI::DEX::Fields::get_field ( std::uint32_t  pos)

Get one of the fields by its position.

Parameters
posposition in the vector
Returns
pointer to FieldID

◆ get_fields() [1/2]

std::vector< fieldid_t > & KUNAI::DEX::Fields::get_fields ( )
inline

Get a reference to all the fields.

Returns
reference to vector of field ids

◆ get_fields() [2/2]

const std::vector< fieldid_t > & KUNAI::DEX::Fields::get_fields ( ) const
inline

Get a constant reference to all the fields.

Returns
constant reference to vector of field ids

◆ get_number_of_fields()

std::uint32_t KUNAI::DEX::Fields::get_number_of_fields ( ) const
inline

Get the number of the fields.

Returns
value of fields_size

◆ parse_fields()

void KUNAI::DEX::Fields::parse_fields ( stream::KunaiStream stream,
Types types,
Strings strings,
std::uint32_t  fields_offset,
std::uint32_t  fields_size 
)

Parse all the field ids objects.

Parameters
streamstream with the dex file
typestypes objects
stringsstrings objects
fields_offsetoffset to the ids of the fields
fields_sizenumber of fields to read

◆ to_xml()

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

Print the fields into an XML format.

Parameters
fosfile where to dump it

Friends And Related Symbol Documentation

◆ operator<<

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

Give a pretty print result of the fields.

Parameters
osstream where to print fields
entryentry to print
Returns
stream

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