1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.ibatis.reflection;
17
18 import org.apache.ibatis.io.Resources;
19
20
21
22
23 public class Jdk {
24
25
26
27
28
29 @Deprecated
30 public static final boolean parameterExists;
31
32 static {
33 boolean available = false;
34 try {
35 Resources.classForName("java.lang.reflect.Parameter");
36 available = true;
37 } catch (ClassNotFoundException e) {
38
39 }
40 parameterExists = available;
41 }
42
43
44
45
46 @Deprecated
47 public static final boolean dateAndTimeApiExists;
48
49 static {
50 boolean available = false;
51 try {
52 Resources.classForName("java.time.Clock");
53 available = true;
54 } catch (ClassNotFoundException e) {
55
56 }
57 dateAndTimeApiExists = available;
58 }
59
60
61
62
63 @Deprecated
64 public static final boolean optionalExists;
65
66 static {
67 boolean available = false;
68 try {
69 Resources.classForName("java.util.Optional");
70 available = true;
71 } catch (ClassNotFoundException e) {
72
73 }
74 optionalExists = available;
75 }
76
77 private Jdk() {
78 super();
79 }
80 }