class_rs/
structs.rs

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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
use crate::enums::{
    AccessFlag, Attribute, ElementValue, StackMapFrameType, TargetInfo, VerificationType,
};

#[derive(Debug)]
pub struct MemberData {
    pub access_flags: Vec<AccessFlag>,
    pub name: u16,
    pub descriptor: u16,
    pub attributes: Vec<Attribute>,
}

#[derive(Debug)]
pub struct Field(pub MemberData);

#[derive(Debug)]
pub struct Method(pub MemberData);

#[derive(Debug)]
pub struct LineNumber {
    pub start_pc: u16,
    pub line_number: u16,
}

#[derive(Debug)]
pub struct Annotation {
    pub type_index: u16,
    pub element_value_pairs: Vec<ElementValuePair>,
}

#[derive(Debug)]
pub struct ElementValuePair {
    pub element_name_index: u16,
    pub value: ElementValue,
}

#[derive(Debug)]
pub struct LookupSwitchPair {
    pub value: u32,
    pub target: u32,
}

#[derive(Debug)]
pub struct BootstrapMethod {
    pub bootstrap_method_ref: u16,
    pub bootstrap_arguments: Vec<u16>,
}

#[derive(Debug)]
pub struct InnerClass {
    pub inner_class_info_index: u16,
    pub outer_class_info_index: u16,
    pub inner_name_index: u16,
    pub inner_class_access_flags: Vec<AccessFlag>,
}

#[derive(Debug)]
pub struct StackMapFrame {
    pub frame_type: StackMapFrameType,
    pub offset_delta: u16,
    pub locals: Vec<VerificationType>,
    pub stack: Vec<VerificationType>,
}

#[derive(Debug)]
pub struct LocalVariable {
    pub start_pc: u16,
    pub length: u16,
    pub name_index: u16,
    pub descriptor_index: u16,
    pub index: u16,
}

#[derive(Debug)]
pub struct LocalVariableType {
    pub start_pc: u16,
    pub length: u16,
    pub name_index: u16,
    pub signature_index: u16,
    pub index: u16,
}

#[derive(Debug)]
pub struct MethodParameter {
    pub name_index: u16,
    pub access_flags: Vec<AccessFlag>,
}

#[derive(Debug)]
pub struct ModuleRequires {
    pub requires_index: u16,
    pub requires_flags: Vec<AccessFlag>,
    pub requires_version_index: u16,
}

#[derive(Debug)]
pub struct ModuleExports {
    pub exports_index: u16,
    pub exports_flags: Vec<AccessFlag>,
    pub exports_to_index: Vec<u16>,
}

#[derive(Debug)]
pub struct ModuleOpens {
    pub opens_index: u16,
    pub opens_flags: Vec<AccessFlag>,
    pub opens_to_index: Vec<u16>,
}

#[derive(Debug)]
pub struct ModuleProvides {
    pub provides_index: u16,
    pub provides_with_index: Vec<u16>,
}

#[derive(Debug)]
pub struct RecordComponent {
    pub name_index: u16,
    pub descriptor_index: u16,
    pub attributes: Vec<Attribute>,
}

#[derive(Debug)]
pub struct LocalVar {
    pub start_pc: u16,
    pub length: u16,
    pub index: u16,
}

#[derive(Debug)]
pub struct TypePath {
    pub type_path_kind: u8,
    pub type_argument_index: u8,
}

#[derive(Debug)]
pub struct TypeAnnotation {
    pub target_info: TargetInfo,
    pub target_path: Vec<TypePath>,
    pub annotation: Annotation,
}