15#ifndef LIEF_DEX_FIELD_H
16#define LIEF_DEX_FIELD_H
21#include "LIEF/DEX/enums.hpp"
23#include "LIEF/visibility.h"
24#include "LIEF/Object.hpp"
26#include "LIEF/DEX/Type.hpp"
37 using access_flags_list_t = std::vector<ACCESS_FLAGS>;
41 Field(std::string name,
Class* parent =
nullptr);
47 const std::string&
name()
const;
67 void accept(
Visitor& visitor)
const override;
70 bool has(ACCESS_FLAGS f)
const;
76 LIEF_API
friend std::ostream& operator<<(std::ostream& os,
const Field& mtd);
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:35
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.
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.
const std::string & name() const
Name of the Field.
const Type * type() const
Field's prototype.
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
Definition Visitor.hpp:219
LIEF namespace.
Definition Abstract/Binary.hpp:32