Rizin
unix-like reverse engineering framework and cli tools
class_method.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2021 deroad <wargio@libero.it>
2 // SPDX-License-Identifier: LGPL-3.0-only
3 
4 #ifndef RZ_BIN_JAVA_CLASS_METHOD_H
5 #define RZ_BIN_JAVA_CLASS_METHOD_H
6 #include <rz_types.h>
7 #include <rz_util.h>
8 #include <rz_bin.h>
9 #include "class_attribute.h"
10 
11 typedef enum {
12  METHOD_ACCESS_FLAG_PUBLIC /* */ = 0x0001,
15  METHOD_ACCESS_FLAG_STATIC /* */ = 0x0008,
16  METHOD_ACCESS_FLAG_FINAL /* */ = 0x0010,
18  METHOD_ACCESS_FLAG_BRIDGE /* */ = 0x0040,
20  METHOD_ACCESS_FLAG_NATIVE /* */ = 0x0100,
23  METHOD_ACCESS_FLAG_STRICT /* */ = 0x0800,
26  METHOD_ACCESS_FLAG_ENUM /* */ = 0x4000
28 
29 typedef struct java_method_t {
37 
38 Method *java_method_new(ConstPool **pool, ut32 poolsize, RzBuffer *buf, ut64 offset, bool is_oak);
39 void java_method_free(Method *method);
40 char *java_method_access_flags_readable(const Method *method);
41 bool java_method_is_global(const Method *method);
42 
43 #endif /* RZ_BIN_JAVA_CLASS_METHOD_H */
Method * java_method_new(ConstPool **pool, ut32 poolsize, RzBuffer *buf, ut64 offset, bool is_oak)
Definition: class_method.c:54
bool java_method_is_global(const Method *method)
Definition: class_method.c:102
char * java_method_access_flags_readable(const Method *method)
Definition: class_method.c:26
MethodAccessFlag
Definition: class_method.h:11
@ METHOD_ACCESS_FLAG_ABSTRACT
Definition: class_method.h:22
@ METHOD_ACCESS_FLAG_SYNTHETIC
Definition: class_method.h:24
@ METHOD_ACCESS_FLAG_PRIVATE
Definition: class_method.h:13
@ METHOD_ACCESS_FLAG_SYNCHRONIZED
Definition: class_method.h:17
@ METHOD_ACCESS_FLAG_STRICT
Definition: class_method.h:23
@ METHOD_ACCESS_FLAG_PROTECTED
Definition: class_method.h:14
@ METHOD_ACCESS_FLAG_BRIDGE
Definition: class_method.h:18
@ METHOD_ACCESS_FLAG_PUBLIC
Definition: class_method.h:12
@ METHOD_ACCESS_FLAG_ANNOTATION
Definition: class_method.h:25
@ METHOD_ACCESS_FLAG_ENUM
Definition: class_method.h:26
@ METHOD_ACCESS_FLAG_INTERFACE
Definition: class_method.h:21
@ METHOD_ACCESS_FLAG_VARARGS
Definition: class_method.h:19
@ METHOD_ACCESS_FLAG_FINAL
Definition: class_method.h:16
@ METHOD_ACCESS_FLAG_STATIC
Definition: class_method.h:15
@ METHOD_ACCESS_FLAG_NATIVE
Definition: class_method.h:20
void java_method_free(Method *method)
Definition: class_method.c:89
struct java_method_t Method
uint16_t ut16
uint32_t ut32
voidpf uLong offset
Definition: ioapi.h:144
voidpf void * buf
Definition: ioapi.h:138
Attribute ** attributes
Definition: class_method.h:35
ut16 attributes_count
Definition: class_method.h:34
ut16 descriptor_index
Definition: class_method.h:33
ut64(WINAPI *w32_GetEnabledXStateFeatures)()