LIEF: Library to Instrument Executable Formats Version 0.15.0
|
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>
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 Class & | cls () const |
const array_t & | array () const |
const PRIMITIVES & | primitive () const |
Class & | cls () |
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 Type & | underlying_array_type () const |
In the case of a TYPES::ARRAY, return the array's type. | |
Type & | underlying_array_type () |
void | accept (Visitor &visitor) const override |
Public Member Functions inherited from LIEF::Object | |
Object (const Object &other) | |
Object & | operator= (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) |
Class which represents a DEX type as described in the format specifications: https://source.android.com/devices/tech/dalvik/dex-format#typedescriptor.
|
overridevirtual |
Implements LIEF::Object.