LIEF: Library to Instrument Executable Formats Version 0.15.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
LIEF::DEX::Type Class Reference

Class which represents a DEX type as described in the format specifications: https://source.android.com/devices/tech/dalvik/dex-format#typedescriptor. More...

#include <Type.hpp>

Inheritance diagram for LIEF::DEX::Type:
Inheritance graph
[legend]
Collaboration diagram for LIEF::DEX::Type:
Collaboration graph
[legend]

Public Types

enum class  TYPES { UNKNOWN = 0 , PRIMITIVE = 1 , CLASS = 2 , ARRAY = 3 }
 
enum class  PRIMITIVES {
  VOID_T = 0x01 , BOOLEAN = 0x02 , BYTE = 0x03 , SHORT = 0x04 ,
  CHAR = 0x05 , INT = 0x06 , LONG = 0x07 , FLOAT = 0x08 ,
  DOUBLE = 0x09
}
 
using array_t = std::vector<Type>
 
- 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

 Type (const std::string &mangled)
 
 Type (const Type &other)
 
TYPES type () const
 Whether it is a primitive type, a class, ...
 
const Classcls () const
 
const array_t & array () const
 
const PRIMITIVES & primitive () const
 
Classcls ()
 IF the current type is a TYPES::CLASS, return the associated DEX::CLASS. Otherwise the returned value is undefined.
 
array_t & array ()
 IF the current type is a TYPES::ARRAY, return the associated array. Otherwise the returned value is undefined.
 
PRIMITIVES & primitive ()
 IF the current type is a TYPES::PRIMITIVE, return the associated PRIMITIVES. Otherwise the returned value is undefined.
 
size_t dim () const
 Return the array dimension if the current type is an array. Otherwise it returns 0.
 
const Typeunderlying_array_type () const
 In the case of a TYPES::ARRAY, return the array's type.
 
Typeunderlying_array_type ()
 
void accept (Visitor &visitor) const override
 
- Public Member Functions inherited from LIEF::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
 

Static Public Member Functions

static std::string pretty_name (PRIMITIVES p)
 

Detailed Description

Class which represents a DEX type as described in the format specifications: https://source.android.com/devices/tech/dalvik/dex-format#typedescriptor.

Member Function Documentation

◆ accept()

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

Implements LIEF::Object.


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