Skip to content

Commit a60d760

Browse files
committed
Added private constructor to RuntimeUtils.
Made RuntimeUtils.rt and loaded private. shannah#26
1 parent b059b50 commit a60d760

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

src/main/java/ca/weblite/objc/RuntimeUtils.java

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
import ca.weblite.nativeutils.NativeUtils;
55
import com.sun.jna.Pointer;
6-
import com.sun.jna.Structure;
7-
import com.sun.jna.Union;
86
import com.sun.jna.ptr.ByReference;
97
import com.sun.jna.ptr.ByteByReference;
108
import com.sun.jna.ptr.DoubleByReference;
@@ -14,13 +12,7 @@
1412
import com.sun.jna.ptr.PointerByReference;
1513
import com.sun.jna.ptr.ShortByReference;
1614
import java.io.IOException;
17-
import java.lang.reflect.Method;
1815
import java.util.Arrays;
19-
import java.util.BitSet;
20-
import java.util.List;
21-
import java.util.Map;
22-
import java.util.logging.Level;
23-
import java.util.logging.Logger;
2416

2517

2618
/**
@@ -48,14 +40,19 @@ public class RuntimeUtils {
4840
/**
4941
* Short reference to the runtime instance for interacting with Objective-C
5042
*/
51-
public static Runtime rt = Runtime.INSTANCE;
43+
private static final Runtime rt = Runtime.INSTANCE;
44+
45+
46+
private RuntimeUtils() {
47+
48+
}
5249

5350
/**
5451
* Flag to indicate whether the jcocoa native library was loaded successfully.
5552
* If it fails to load, then this flag will be false. Therefore, if this
5653
* flag is false, you shouldn't try to use the the api at all.
5754
*/
58-
public static boolean loaded = false;
55+
private static boolean loaded = false;
5956
static {
6057
try {
6158
//System.loadLibrary("jcocoa");

0 commit comments

Comments
 (0)