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

Class representing the Map List, this map contains different information about different types. More...

#include <map_item.hpp>

Classes

struct  map_item
 Map that store the information of the map. More...
 

Public Types

enum  type_codes : std::uint16_t {
  TYPE_HEADER_ITEM = 0x0000 , TYPE_STRING_ID_ITEM = 0x0001 , TYPE_TYPE_ID_ITEM = 0x0002 , TYPE_PROTO_ID_ITEM = 0x0003 ,
  TYPE_FIELD_ID_ITEM = 0x0004 , TYPE_METHOD_ID_ITEM = 0x0005 , TYPE_CLASS_DEF_ITEM = 0x0006 , TYPE_CALL_SITE_ID_ITEM = 0x0007 ,
  TYPE_METHOD_HANDLE_ITEM = 0x0008 , TYPE_MAP_LIST = 0x1000 , TYPE_TYPE_LIST = 0x1001 , TYPE_ANNOTATION_SET_REF_LIST = 0x1002 ,
  TYPE_ANNOTATION_SET_ITEM = 0x1003 , TYPE_CLASS_DATA_ITEM = 0x2000 , TYPE_CODE_ITEM = 0x2001 , TYPE_STRING_DATA_ITEM = 0x2002 ,
  TYPE_DEBUG_INFO_ITEM = 0x2003 , TYPE_ANNOTATION_ITEM = 0x2004 , TYPE_ENCODED_ARRAY_ITEM = 0x2005 , TYPE_ANNOTATIONS_DIRECTORY_ITEM = 0x2006 ,
  TYPE_HIDDENAPI_CLASS_DATA_ITEM = 0xF000
}
 all possible type codes
 

Public Member Functions

 MapList ()=default
 Constructor of the MapList.
 
 ~MapList ()=default
 Destructor of the MapList.
 
void parse_map_list (stream::KunaiStream *stream, std::uint32_t map_off)
 Parse the map list from the DEX file to create the map.
 
const std::unordered_map< type_codes, map_item > & get_map_items () const
 Get the map items from the DEX.
 
std::unordered_map< type_codes, map_item > & get_map_items ()
 Get the map items from the DEX.
 

Detailed Description

Class representing the Map List, this map contains different information about different types.

Member Function Documentation

◆ get_map_items() [1/2]

std::unordered_map< type_codes, map_item > & KUNAI::DEX::MapList::get_map_items ( )
inline

Get the map items from the DEX.

Returns
reference to the map items

◆ get_map_items() [2/2]

const std::unordered_map< type_codes, map_item > & KUNAI::DEX::MapList::get_map_items ( ) const
inline

Get the map items from the DEX.

Returns
constant reference to the map items

◆ parse_map_list()

void KUNAI::DEX::MapList::parse_map_list ( stream::KunaiStream stream,
std::uint32_t  map_off 
)

Parse the map list from the DEX file to create the map.

Parameters
streamDEX file content
map_offoffset to the map_list

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