1 package ch.qos.logback.classic.spi;
2
3 /**
4 * This class provides information about the runtime platform.
5 *
6 * @author Ceki Gulcu
7 * */
8 public class PlatformInfo {
9
10 private static final int UNINITIALIZED = -1;
11
12 private static int hasJMXObjectName = UNINITIALIZED;
13
14 public static boolean hasJMXObjectName() {
15 if (hasJMXObjectName == UNINITIALIZED) {
16 try {
17 Class.forName("javax.management.ObjectName");
18 hasJMXObjectName = 1;
19 } catch (Throwable e) {
20 hasJMXObjectName = 0;
21 }
22 }
23 return (hasJMXObjectName == 1);
24 }
25 }