LIEF: Library to Instrument Executable Formats Version 0.16.0
Loading...
Searching...
No Matches
LIEF::DEX::Class Class Reference

Class which represents a DEX Class (i.e. a Java/Kotlin class) More...

#include <Class.hpp>

Inheritance diagram for LIEF::DEX::Class:
Collaboration diagram for LIEF::DEX::Class:

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
 
Classoperator= (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 Classparent () const
 Parent class.
 
Classparent ()
 
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)
 
Objectoperator= (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)
 

Detailed Description

Class which represents a DEX Class (i.e. a Java/Kotlin class)

Member Typedef Documentation

◆ access_flags_list_t

◆ fields_t

using LIEF::DEX::Class::fields_t = std::vector<Field*>

◆ it_const_fields

◆ it_const_methods

◆ it_const_named_fields

◆ it_const_named_methods

◆ it_fields

◆ it_methods

◆ it_named_fields

◆ it_named_methods

◆ methods_t

using LIEF::DEX::Class::methods_t = std::vector<Method*>

Constructor & Destructor Documentation

◆ Class() [1/3]

LIEF::DEX::Class::Class ( )

◆ Class() [2/3]

LIEF::DEX::Class::Class ( const Class & )
delete

◆ Class() [3/3]

LIEF::DEX::Class::Class ( std::string fullname,
uint32_t access_flags = ACCESS_FLAGS::ACC_UNKNOWN,
Class * parent = nullptr,
std::string source_filename = "" )

◆ ~Class()

LIEF::DEX::Class::~Class ( )
override

Member Function Documentation

◆ accept()

void LIEF::DEX::Class::accept ( Visitor & visitor) const
overridevirtual

Implements LIEF::Object.

◆ access_flags()

access_flags_list_t LIEF::DEX::Class::access_flags ( ) const

Access flags used by this class.

◆ dex2dex_info()

dex2dex_class_info_t LIEF::DEX::Class::dex2dex_info ( ) const

De-optimize information.

◆ fields() [1/4]

it_fields LIEF::DEX::Class::fields ( )

◆ fields() [2/4]

it_const_fields LIEF::DEX::Class::fields ( ) const

Fields implemented in this class.

◆ fields() [3/4]

it_named_fields LIEF::DEX::Class::fields ( const std::string & name)

Return Fields having the given name.

◆ fields() [4/4]

it_const_named_fields LIEF::DEX::Class::fields ( const std::string & name) const

◆ fullname()

const std::string & LIEF::DEX::Class::fullname ( ) const

Mangled class name (e.g. Lcom/example/android/MyActivity;)

◆ fullname_normalized() [1/2]

static std::string LIEF::DEX::Class::fullname_normalized ( const std::string & pkg,
const std::string & cls_name )
static

◆ fullname_normalized() [2/2]

static std::string LIEF::DEX::Class::fullname_normalized ( const std::string & pkg_cls)
static

◆ has()

bool LIEF::DEX::Class::has ( ACCESS_FLAGS f) const

Check if the class has the given access flag.

◆ has_parent()

bool LIEF::DEX::Class::has_parent ( ) const

True if the current class extends another one.

◆ index()

size_t LIEF::DEX::Class::index ( ) const

Original index in the DEX class pool.

◆ methods() [1/4]

it_methods LIEF::DEX::Class::methods ( )

◆ methods() [2/4]

it_const_methods LIEF::DEX::Class::methods ( ) const

Methods implemented in this class.

◆ methods() [3/4]

it_named_methods LIEF::DEX::Class::methods ( const std::string & name)

Return Methods having the given name.

◆ methods() [4/4]

it_const_named_methods LIEF::DEX::Class::methods ( const std::string & name) const

◆ name()

std::string LIEF::DEX::Class::name ( ) const

Class name.

◆ operator=()

Class & LIEF::DEX::Class::operator= ( const Class & )
delete

◆ package_name()

std::string LIEF::DEX::Class::package_name ( ) const

Package Name.

◆ package_normalized()

static std::string LIEF::DEX::Class::package_normalized ( const std::string & pkg_name)
static

◆ parent() [1/2]

Class * LIEF::DEX::Class::parent ( )

◆ parent() [2/2]

const Class * LIEF::DEX::Class::parent ( ) const

Parent class.

◆ pretty_name()

std::string LIEF::DEX::Class::pretty_name ( ) const

Demangled class name.

◆ source_filename()

const std::string & LIEF::DEX::Class::source_filename ( ) const

Filename associated with this class (if any)


The documentation for this class was generated from the following file: