LIEF: Library to Instrument Executable Formats Version 0.15.1
|
Class which represents a DEX Class (i.e. a Java/Kotlin class) More...
#include <Class.hpp>
Public Types | |
using | access_flags_list_t = std::vector<ACCESS_FLAGS> |
using | methods_t = std::vector<Method*> |
using | it_methods = ref_iterator<methods_t&> |
using | it_const_methods = const_ref_iterator<const methods_t&> |
using | fields_t = std::vector<Field*> |
using | it_fields = ref_iterator<fields_t&> |
using | it_const_fields = const_ref_iterator<const fields_t&> |
using | it_named_methods = filter_iterator<methods_t&> |
using | it_const_named_methods = const_filter_iterator<const methods_t&> |
using | it_named_fields = filter_iterator<fields_t&> |
using | it_const_named_fields = const_filter_iterator<const fields_t&> |
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 | |
Class () | |
Class (const Class &)=delete | |
Class & | operator= (const Class &)=delete |
Class (std::string fullname, uint32_t access_flags=ACCESS_FLAGS::ACC_UNKNOWN, Class *parent=nullptr, std::string source_filename="") | |
const std::string & | fullname () const |
Mangled class name (e.g. Lcom/example/android/MyActivity; ) | |
std::string | package_name () const |
Package Name. | |
std::string | name () const |
Class name. | |
std::string | pretty_name () const |
Demangled class name. | |
bool | has (ACCESS_FLAGS f) const |
Check if the class has the given access flag. | |
access_flags_list_t | access_flags () const |
Access flags used by this class. | |
const std::string & | source_filename () const |
Filename associated with this class (if any) | |
bool | has_parent () const |
True if the current class extends another one. | |
const Class * | parent () const |
Parent class. | |
Class * | parent () |
it_const_methods | methods () const |
Methods implemented in this class. | |
it_methods | methods () |
it_named_methods | methods (const std::string &name) |
Return Methods having the given name. | |
it_const_named_methods | methods (const std::string &name) const |
it_const_fields | fields () const |
Fields implemented in this class. | |
it_fields | fields () |
it_named_fields | fields (const std::string &name) |
Return Fields having the given name. | |
it_const_named_fields | fields (const std::string &name) const |
dex2dex_class_info_t | dex2dex_info () const |
De-optimize information. | |
size_t | index () const |
Original index in the DEX class pool. | |
void | accept (Visitor &visitor) const override |
~Class () override | |
Public Member Functions inherited from LIEF::Object | |
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 |
virtual | ~Object () |
Static Public Member Functions | |
static std::string | package_normalized (const std::string &pkg_name) |
static std::string | fullname_normalized (const std::string &pkg_cls) |
static std::string | fullname_normalized (const std::string &pkg, const std::string &cls_name) |
using LIEF::DEX::Class::access_flags_list_t = std::vector<ACCESS_FLAGS> |
using LIEF::DEX::Class::fields_t = std::vector<Field*> |
using LIEF::DEX::Class::it_const_fields = const_ref_iterator<const fields_t&> |
using LIEF::DEX::Class::it_const_methods = const_ref_iterator<const methods_t&> |
using LIEF::DEX::Class::it_const_named_fields = const_filter_iterator<const fields_t&> |
using LIEF::DEX::Class::it_const_named_methods = const_filter_iterator<const methods_t&> |
using LIEF::DEX::Class::it_fields = ref_iterator<fields_t&> |
using LIEF::DEX::Class::methods_t = std::vector<Method*> |
LIEF::DEX::Class::Class | ( | ) |
|
delete |
LIEF::DEX::Class::Class | ( | std::string | fullname, |
uint32_t | access_flags = ACCESS_FLAGS::ACC_UNKNOWN, | ||
Class * | parent = nullptr, | ||
std::string | source_filename = "" ) |
|
override |
|
overridevirtual |
Implements LIEF::Object.
access_flags_list_t LIEF::DEX::Class::access_flags | ( | ) | const |
Access flags used by this class.
dex2dex_class_info_t LIEF::DEX::Class::dex2dex_info | ( | ) | const |
De-optimize information.
it_fields LIEF::DEX::Class::fields | ( | ) |
it_const_fields LIEF::DEX::Class::fields | ( | ) | const |
Fields implemented in this class.
it_named_fields LIEF::DEX::Class::fields | ( | const std::string & | name | ) |
Return Fields having the given name.
it_const_named_fields LIEF::DEX::Class::fields | ( | const std::string & | name | ) | const |
const std::string & LIEF::DEX::Class::fullname | ( | ) | const |
Mangled class name (e.g. Lcom/example/android/MyActivity;
)
|
static |
|
static |
bool LIEF::DEX::Class::has | ( | ACCESS_FLAGS | f | ) | const |
Check if the class has the given access flag.
bool LIEF::DEX::Class::has_parent | ( | ) | const |
True if the current class extends another one.
size_t LIEF::DEX::Class::index | ( | ) | const |
Original index in the DEX class pool.
it_methods LIEF::DEX::Class::methods | ( | ) |
it_const_methods LIEF::DEX::Class::methods | ( | ) | const |
Methods implemented in this class.
it_named_methods LIEF::DEX::Class::methods | ( | const std::string & | name | ) |
Return Methods having the given name.
it_const_named_methods LIEF::DEX::Class::methods | ( | const std::string & | name | ) | const |
std::string LIEF::DEX::Class::name | ( | ) | const |
Class name.
std::string LIEF::DEX::Class::package_name | ( | ) | const |
Package Name.
|
static |
Class * LIEF::DEX::Class::parent | ( | ) |
const Class * LIEF::DEX::Class::parent | ( | ) | const |
Parent class.
std::string LIEF::DEX::Class::pretty_name | ( | ) | const |
Demangled class name.
const std::string & LIEF::DEX::Class::source_filename | ( | ) | const |
Filename associated with this class (if any)