16#ifndef LIEF_DEX_TYPE_H
17#define LIEF_DEX_TYPE_H
23#include "LIEF/visibility.h"
24#include "LIEF/Object.hpp"
44 enum class PRIMITIVES {
56 using array_t = std::vector<Type>;
59 static std::string pretty_name(PRIMITIVES p);
63 Type(
const std::string& mangled);
69 const Class& cls()
const;
70 const array_t& array()
const;
71 const PRIMITIVES& primitive()
const;
91 Type& underlying_array_type();
93 void accept(
Visitor& visitor)
const override;
96 LIEF_API
friend std::ostream& operator<<(std::ostream& os,
const Type& type);
101 void parse(
const std::string& type);
103 TYPES type_{TYPES::UNKNOWN};
105 Class* cls_{
nullptr};
Class which represents a DEX Class (i.e. a Java/Kotlin class)
Definition DEX/Class.hpp:35
Class which parses a DEX file to produce a DEX::File object.
Definition DEX/Parser.hpp:38
Class which represents a DEX type as described in the format specifications: https://source....
Definition Type.hpp:33
Class & cls()
IF the current type is a TYPES::CLASS, return the associated DEX::CLASS. Otherwise the returned value...
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.
PRIMITIVES & primitive()
IF the current type is a TYPES::PRIMITIVE, return the associated PRIMITIVES. Otherwise the returned v...
array_t & array()
IF the current type is a TYPES::ARRAY, return the associated array. Otherwise the returned value is u...
TYPES type() const
Whether it is a primitive type, a class, ...
Definition Visitor.hpp:219
LIEF namespace.
Definition Abstract/Binary.hpp:32