19
19
20
20
#include " bytecode_info.h"
21
21
22
- class java_bytecode_parse_treet
22
+ struct java_bytecode_parse_treet
23
23
{
24
- public:
25
24
// Disallow copy construction and copy assignment, but allow move construction
26
25
// and move assignment.
27
26
#ifndef _MSC_VER // Ommit this on MS VC2013 as move is not supported.
@@ -32,15 +31,12 @@ class java_bytecode_parse_treet
32
31
java_bytecode_parse_treet &operator =(java_bytecode_parse_treet &&) = default ;
33
32
#endif
34
33
35
- virtual ~java_bytecode_parse_treet () = default ;
36
- class annotationt
34
+ struct annotationt
37
35
{
38
- public:
39
36
typet type;
40
37
41
- class element_value_pairt
38
+ struct element_value_pairt
42
39
{
43
- public:
44
40
irep_idt element_name;
45
41
exprt value;
46
42
void output (std::ostream &) const ;
@@ -58,27 +54,23 @@ class java_bytecode_parse_treet
58
54
const annotationst &annotations,
59
55
const irep_idt &annotation_type_name);
60
56
61
- class instructiont
57
+ struct instructiont
62
58
{
63
- public:
64
59
source_locationt source_location;
65
60
unsigned address;
66
61
irep_idt statement;
67
62
typedef std::vector<exprt> argst;
68
63
argst args;
69
64
};
70
65
71
- class membert
66
+ struct membert
72
67
{
73
- public:
74
68
std::string descriptor;
75
69
optionalt<std::string> signature;
76
70
irep_idt name;
77
71
bool is_public, is_protected, is_private, is_static, is_final;
78
72
annotationst annotations;
79
73
80
- virtual void output (std::ostream &out) const = 0;
81
-
82
74
membert ():
83
75
is_public (false ), is_protected(false ),
84
76
is_private (false ), is_static(false ), is_final(false )
@@ -91,9 +83,8 @@ class java_bytecode_parse_treet
91
83
}
92
84
};
93
85
94
- class methodt : public membert
86
+ struct methodt : public membert
95
87
{
96
- public:
97
88
irep_idt base_name;
98
89
bool is_native, is_abstract, is_synchronized;
99
90
source_locationt source_location;
@@ -109,7 +100,6 @@ class java_bytecode_parse_treet
109
100
110
101
struct exceptiont
111
102
{
112
- public:
113
103
exceptiont ()
114
104
: start_pc(0 ), end_pc(0 ), handler_pc(0 ), catch_type(irep_idt())
115
105
{
@@ -124,9 +114,8 @@ class java_bytecode_parse_treet
124
114
typedef std::vector<exceptiont> exception_tablet;
125
115
exception_tablet exception_table;
126
116
127
- class local_variablet
117
+ struct local_variablet
128
118
{
129
- public:
130
119
irep_idt name;
131
120
std::string descriptor;
132
121
optionalt<std::string> signature;
@@ -138,9 +127,8 @@ class java_bytecode_parse_treet
138
127
typedef std::vector<local_variablet> local_variable_tablet;
139
128
local_variable_tablet local_variable_table;
140
129
141
- class verification_type_infot
130
+ struct verification_type_infot
142
131
{
143
- public:
144
132
enum verification_type_info_type { TOP, INTEGER, FLOAT, LONG, DOUBLE,
145
133
ITEM_NULL, UNINITIALIZED_THIS,
146
134
OBJECT, UNINITIALIZED};
@@ -150,9 +138,8 @@ class java_bytecode_parse_treet
150
138
u2 offset;
151
139
};
152
140
153
- class stack_map_table_entryt
141
+ struct stack_map_table_entryt
154
142
{
155
- public:
156
143
enum stack_frame_type
157
144
{
158
145
SAME, SAME_LOCALS_ONE_STACK, SAME_LOCALS_ONE_STACK_EXTENDED,
@@ -175,29 +162,29 @@ class java_bytecode_parse_treet
175
162
typedef std::vector<stack_map_table_entryt> stack_map_tablet;
176
163
stack_map_tablet stack_map_table;
177
164
178
- virtual void output (std::ostream &out) const ;
165
+ void output (std::ostream &out) const ;
179
166
180
167
methodt ():
181
168
is_native (false ),
182
169
is_abstract (false ),
183
170
is_synchronized (false )
184
171
{
185
172
}
186
-
187
- virtual ~methodt () = default ;
188
173
};
189
174
190
- class fieldt : public membert
175
+ struct fieldt : public membert
191
176
{
192
- public:
193
- virtual ~fieldt () = default ;
194
- virtual void output (std::ostream &out) const ;
195
177
bool is_enum;
178
+
179
+ void output (std::ostream &out) const ;
180
+
181
+ fieldt () : is_enum(false )
182
+ {
183
+ }
196
184
};
197
185
198
- class classt
186
+ struct classt
199
187
{
200
- public:
201
188
classt () = default ;
202
189
203
190
// Disallow copy construction and copy assignment, but allow move
@@ -230,9 +217,8 @@ class java_bytecode_parse_treet
230
217
};
231
218
232
219
typedef std::vector<u2> u2_valuest;
233
- class lambda_method_handlet
220
+ struct lambda_method_handlet
234
221
{
235
- public:
236
222
method_handle_typet handle_type;
237
223
irep_idt lambda_method_name;
238
224
irep_idt lambda_method_ref;
0 commit comments