File: Fixture.java

package info (click to toggle)
python-jpype 1.6.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,348 kB
  • sloc: python: 19,275; cpp: 18,049; java: 8,638; xml: 1,454; makefile: 155; sh: 37
file content (509 lines) | stat: -rw-r--r-- 8,490 bytes parent folder | download | duplicates (3)
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
/* ****************************************************************************
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

  See NOTICE file for details.
**************************************************************************** */
package jpype.common;

public class Fixture
{
  // Tests for access

  private static Object static_private_object_field
          = new String("private static object field");
  private Object private_object_field
          = new String("private object field");
  public final static Object final_static_object_field
          = new String("final static object field");
  public final Object final_object_field
          = new String("final object field");

  public final static int final_static_int_field = 12345;
  public final int final_int_field = 67890;

  public static boolean static_bool_field;
  public static char static_char_field;
  public static byte static_byte_field;
  public static short static_short_field;
  public static int static_int_field;
  public static long static_long_field;
  public static float static_float_field;
  public static double static_double_field;
  public static Object static_object_field;

  public static boolean getStaticBool()
  {
    return static_bool_field;
  }

  public static char getStaticChar()
  {
    return static_char_field;
  }

  public static byte getStaticByte()
  {
    return static_byte_field;
  }

  public static short getStaticShort()
  {
    return static_short_field;
  }

  public static int getStaticInt()
  {
    return static_int_field;
  }

  public static long getStaticLong()
  {
    return static_long_field;
  }

  public static float getStaticFloat()
  {
    return static_float_field;
  }

  public static double getStaticDouble()
  {
    return static_double_field;
  }

  public static Object getStaticObject()
  {
    return static_object_field;
  }

  public static void setStaticBool(boolean i)
  {
    static_bool_field = i;
  }

  public static void setStaticChar(char i)
  {
    static_char_field = i;
  }

  public static void setStaticByte(byte i)
  {
    static_byte_field = i;
  }

  public static void setStaticShort(short i)
  {
    static_short_field = i;
  }

  public static void setStaticInt(int i)
  {
    static_int_field = i;
  }

  public static void setStaticLong(long i)
  {
    static_long_field = i;
  }

  public static void setStaticFloat(float i)
  {
    static_float_field = i;
  }

  public static void setStaticDouble(double i)
  {
    static_double_field = i;
  }

  public static void setStaticObject(Object i)
  {
    static_object_field = i;
  }

  public boolean bool_field;
  public char char_field;
  public byte byte_field;
  public short short_field;
  public int int_field;
  public long long_field;
  public float float_field;
  public double double_field;
  public Object object_field;

  public boolean getBool()
  {
    return bool_field;
  }

  public char getChar()
  {
    return char_field;
  }

  public byte getByte()
  {
    return byte_field;
  }

  public short getShort()
  {
    return short_field;
  }

  public int getInt()
  {
    return int_field;
  }

  public long getLong()
  {
    return long_field;
  }

  public float getFloat()
  {
    return float_field;
  }

  public double getDouble()
  {
    return double_field;
  }

  public Object getObject()
  {
    return object_field;
  }

  public void setBool(boolean i)
  {
    bool_field = i;
  }

  public void setChar(char i)
  {
    char_field = i;
  }

  public void setByte(byte i)
  {
    byte_field = i;
  }

  public void setShort(short i)
  {
    short_field = i;
  }

  public void setInt(int i)
  {
    int_field = i;
  }

  public void setLong(long i)
  {
    long_field = i;
  }

  public void setFloat(float i)
  {
    float_field = i;
  }

  public void setDouble(double i)
  {
    double_field = i;
  }

  public void setObject(Object i)
  {
    object_field = i;
  }

  public static boolean throwStaticBool()
  {
    throw new RuntimeException("bool");
  }

  public static char throwStaticChar()
  {
    throw new RuntimeException("char");
  }

  public static byte throwStaticByte()
  {
    throw new RuntimeException("byte");
  }

  public static short throwStaticShort()
  {
    throw new RuntimeException("short");
  }

  public static int throwStaticInt()
  {
    throw new RuntimeException("int");
  }

  public static long throwStaticLong()
  {
    throw new RuntimeException("long");
  }

  public static float throwStaticFloat()
  {
    throw new RuntimeException("float");
  }

  public static double throwStaticDouble()
  {
    throw new RuntimeException("double");
  }

  public static Object throwStaticObject()
  {
    throw new RuntimeException("object");
  }

  public boolean throwBool()
  {
    throw new RuntimeException("bool");
  }

  public char throwChar()
  {
    throw new RuntimeException("char");
  }

  public byte throwByte()
  {
    throw new RuntimeException("byte");
  }

  public short throwShort()
  {
    throw new RuntimeException("short");
  }

  public int throwInt()
  {
    throw new RuntimeException("int");
  }

  public long throwLong()
  {
    throw new RuntimeException("long");
  }

  public float throwFloat()
  {
    throw new RuntimeException("float");
  }

  public double throwDouble()
  {
    throw new RuntimeException("double");
  }

  public Object throwObject()
  {
    throw new RuntimeException("object");
  }

  public boolean callBoolean(boolean i)
  {
    return i;
  }

  public byte callByte(byte i)
  {
    return i;
  }

  public char callChar(char i)
  {
    return i;
  }

  public short callShort(short i)
  {
    return i;
  }

  public int callInt(int i)
  {
    return i;
  }

  public long callLong(long i)
  {
    return i;
  }

  public float callFloat(float i)
  {
    return i;
  }

  public double callDouble(double i)
  {
    return i;
  }

  public String callString(String i)
  {
    return i;
  }

  public java.lang.Boolean callBoxedBoolean(java.lang.Boolean i)
  {
    return i;
  }

  public java.lang.Byte callBoxedByte(java.lang.Byte i)
  {
    return i;
  }

  public java.lang.Character callBoxedChar(java.lang.Character i)
  {
    return i;
  }

  public java.lang.Short callBoxedShort(java.lang.Short i)
  {
    return i;
  }

  public java.lang.Integer callBoxedInt(java.lang.Integer i)
  {
    return i;
  }

  public java.lang.Long callBoxedLong(java.lang.Long i)
  {
    return i;
  }

  public java.lang.Float callBoxedFloat(java.lang.Float i)
  {
    return i;
  }

  public java.lang.Double callBoxedDouble(java.lang.Double i)
  {
    return i;
  }

  public static boolean callStaticBoolean(boolean i)
  {
    return i;
  }

  public static byte callStaticByte(byte i)
  {
    return i;
  }

  public static char callStaticChar(char i)
  {
    return i;
  }

  public static short callStaticShort(short i)
  {
    return i;
  }

  public static int callStaticInt(int i)
  {
    return i;
  }

  public static long callStaticLong(long i)
  {
    return i;
  }

  public static float callStaticFloat(float i)
  {
    return i;
  }

  public static double callStaticDouble(double i)
  {
    return i;
  }

  public static String callStaticString(String i)
  {
    return i;
  }

  public static Object callStaticObject(Object i)
  {
    return i;
  }

  private static Object callPrivateStaticObject(Object i)
  {
    return i;
  }

  public Object callObject(Object i)
  {
    return i;
  }

  private Object callPrivateObject(Object i)
  {
    return i;
  }

  protected Object callProtectedObject(Object i)
  {
    return i;
  }

  public static Number callNumber(Number n)
  {
    return n;
  }

  public Object callSupplier(java.util.function.Supplier s)
  {
    return s.get();
  }

  public Object callCharArray(char[] c)
  {
    return c;
  }

  public Object callByteArray(byte[] c)
  {
    return c;
  }

  public Object callClass(Class c)
  {
    return c;
  }

  public Iterable callIterable(Iterable c)
  {
    return c;
  }

}