-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClassFile.h
More file actions
52 lines (37 loc) · 965 Bytes
/
Copy pathClassFile.h
File metadata and controls
52 lines (37 loc) · 965 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#pragma once
#include <stdint.h>
#include "ConstantPool.h"
typedef struct {
uint16_t attribute_name_index;
uint32_t attribute_length;
uint8_t* data;
} attribute_info;
typedef struct {
uint16_t access_flags;
uint16_t name_index;
uint16_t descriptor_index;
uint16_t attributes_count;
attribute_info* attributes;
} method_info;
typedef struct {
uint16_t access_flags;
uint16_t name_index;
uint16_t descriptor_index;
uint16_t attributes_count;
attribute_info* attributes;
} field_info;
typedef struct {
uint32_t magic;
uint16_t minor_version;
uint16_t major_version;
uint16_t constant_pool_count;
uint16_t access_flags;
uint16_t this_class;
uint16_t super_class;
uint16_t interfaces_count;
uint16_t fields_count;
uint16_t methods_count;
uint16_t attributes_count;
cp_info* constant_pool;
} ClassFile;
void class_file_delete(const ClassFile* class_file);