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
30 @Deprecated
31 public static final boolean parameterExists;
32
33 static {
34 boolean available = false;
35 try {
36 Resources.classForName("java.lang.reflect.Parameter");
37 available = true;
38 } catch (ClassNotFoundException e) {
39
40 }
41 parameterExists = available;
42 }
43
44
45
46
47 @Deprecated
48 public static final boolean dateAndTimeApiExists;
49
50 static {
51 boolean available = false;
52 try {
53 Resources.classForName("java.time.Clock");
54 available = true;
55 } catch (ClassNotFoundException e) {
56
57 }
58 dateAndTimeApiExists = available;
59 }
60
61
62
63
64 @Deprecated
65 public static final boolean optionalExists;
66
67 static {
68 boolean available = false;
69 try {
70 Resources.classForName("java.util.Optional");
71 available = true;
72 } catch (ClassNotFoundException e) {
73
74 }
75 optionalExists = available;
76 }
77
78 private Jdk() {
79 }
80 }