Go to the documentation of this file.
16#ifndef LIEF_DEX_TYPE_H
17#define LIEF_DEX_TYPE_H
44 enum class PRIMITIVES {
56 using array_t = std::vector<Type>;
63 Type(
const std::string& mangled);
69 const Class&
cls()
const;
93 void accept(Visitor& visitor)
const override;
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:36
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 DEX/Type.hpp:33
Class & cls()
IF the current type is a TYPES::CLASS, return the associated DEX::CLASS. Otherwise the returned value...
const PRIMITIVES & primitive() const
size_t dim() const
Return the array dimension if the current type is an array. Otherwise it returns 0.
void accept(Visitor &visitor) const override
Type(const std::string &mangled)
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...
friend std::ostream & operator<<(std::ostream &os, const Type &type)
const Class & cls() const
static std::string pretty_name(PRIMITIVES p)
Type & underlying_array_type()
const array_t & array() const
TYPES type() const
Whether it is a primitive type, a class, ...
Definition DEX/Class.hpp:30
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41