Go to the documentation of this file.
15#ifndef LIEF_DEX_FIELD_H
16#define LIEF_DEX_FIELD_H
37 using access_flags_list_t = std::vector<ACCESS_FLAGS>;
41 Field(std::string name, Class* parent =
nullptr);
45 const std::string&
name()
const;
52 const Class*
cls()
const;
62 const Type*
type()
const;
67 void accept(Visitor& visitor)
const override;
68 bool has(ACCESS_FLAGS f)
const;
81 void set_static(
bool v);
85 Class* parent_ =
nullptr;
86 Type* type_ =
nullptr;
87 uint32_t access_flags_ = 0;
88 uint32_t original_index_ = UINT_MAX;
89 bool is_static_ =
false;
Class which represents a DEX Class (i.e. a Java/Kotlin class)
Definition DEX/Class.hpp:36
Class which represent a DEX Field.
Definition Field.hpp:34
bool has(ACCESS_FLAGS f) const
Check if the field has the given ACCESS_FLAGS.
const Class * cls() const
Class associated with this Field.
access_flags_list_t access_flags() const
ACCESS_FLAGS as a list.
Field(std::string name, Class *parent=nullptr)
bool is_static() const
True if this field is a static one.
bool has_class() const
True if a class is associated with this field (which should be the case)
size_t index() const
Index in the DEX Fields pool.
Field & operator=(const Field &)
void accept(Visitor &visitor) const override
const std::string & name() const
Name of the Field.
friend std::ostream & operator<<(std::ostream &os, const Field &mtd)
const Type * type() const
Field's prototype.
Class which parses a DEX file to produce a DEX::File object.
Definition DEX/Parser.hpp:38
Definition DEX/Class.hpp:30
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41