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

Represents the base class of a Type in the DVM we have different types. More...

#include <types.hpp>

Inheritance diagram for KUNAI::DEX::DVMType:
Inheritance graph
[legend]

Public Types

enum  type_e { FUNDAMENTAL , CLASS , ARRAY , UNKNOWN }
 Types of the DVM we have by default fundamental, classes and array types. More...
 

Public Member Functions

 DVMType (type_e type, std::string raw_type)
 Constructor of DVMType.
 
virtual ~DVMType ()=default
 Destructor of DVMType.
 
virtual type_e get_type () const =0
 Virtual method to return the type.
 
virtual std::string print_type () const =0
 Get the type on its string representation.
 
std::string & get_raw ()
 get raw string from the type object
 
virtual const std::string & pretty_print ()
 Pretty print the name of the type.
 

Detailed Description

Represents the base class of a Type in the DVM we have different types.

Member Enumeration Documentation

◆ type_e

Types of the DVM we have by default fundamental, classes and array types.

Enumerator
CLASS 

fundamental type (int, float...)

ARRAY 

user defined class

UNKNOWN 

an array type

maybe wrong?

Constructor & Destructor Documentation

◆ DVMType()

KUNAI::DEX::DVMType::DVMType ( type_e  type,
std::string  raw_type 
)
inline

Constructor of DVMType.

Parameters
typethe type to overload
raw_typestring with the type in raw

Member Function Documentation

◆ get_raw()

std::string & KUNAI::DEX::DVMType::get_raw ( )
inline

get raw string from the type object

Returns
string from the type

◆ get_type()

virtual type_e KUNAI::DEX::DVMType::get_type ( ) const
pure virtual

Virtual method to return the type.

Returns
type of the variable

Implemented in KUNAI::DEX::DVMFundamental, KUNAI::DEX::DVMClass, KUNAI::DEX::DVMArray, and KUNAI::DEX::Unknown.

◆ pretty_print()

virtual const std::string & KUNAI::DEX::DVMType::pretty_print ( )
inlinevirtual

Pretty print the name of the type.

Returns
pretty print version of the name

Reimplemented in KUNAI::DEX::DVMFundamental, KUNAI::DEX::DVMClass, and KUNAI::DEX::DVMArray.

◆ print_type()

virtual std::string KUNAI::DEX::DVMType::print_type ( ) const
pure virtual

Get the type on its string representation.

Returns
type in string format

Implemented in KUNAI::DEX::DVMFundamental, KUNAI::DEX::DVMClass, KUNAI::DEX::DVMArray, and KUNAI::DEX::Unknown.


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