RobotCore 1.0
WPILib port to raspberry Pi
Loading...
Searching...
No Matches
WPIMathJNI.java
1// TODO - RobotCore - Modified
2
3// Copyright (c) FIRST and other WPILib contributors.
4// Open Source Software; you can modify and/or share it under the terms of
5// the WPILib BSD license file in the root directory of this project.
6
7package org.wpilib.math.jni;
8
9// import java.io.IOException;
10// import java.util.concurrent.atomic.AtomicBoolean;
11// import org.wpilib.util.runtime.RuntimeLoader;
12
14public class WPIMathJNI {
15 // private static boolean libraryLoaded = false;
16
17 // /** Sets whether JNI should be loaded in the static block. */
18 // public static class Helper {
19 // private static AtomicBoolean extractOnStaticLoad = new AtomicBoolean(true);
20
21 // /**
22 // * Returns true if the JNI should be loaded in the static block.
23 // *
24 // * @return True if the JNI should be loaded in the static block.
25 // */
26 // public static boolean getExtractOnStaticLoad() {
27 // return extractOnStaticLoad.get();
28 // }
29
30 // /**
31 // * Sets whether the JNI should be loaded in the static block.
32 // *
33 // * @param load Whether the JNI should be loaded in the static block.
34 // */
35 // public static void setExtractOnStaticLoad(boolean load) {
36 // extractOnStaticLoad.set(load);
37 // }
38
39 // /** Utility class. */
40 // private Helper() {}
41 // }
42
43 // static {
44 // if (Helper.getExtractOnStaticLoad()) {
45 // try {
46 // RuntimeLoader.loadLibrary("wpimathjni");
47 // } catch (Exception ex) {
48 // ex.printStackTrace();
49 // System.exit(1);
50 // }
51 // libraryLoaded = true;
52 // }
53 // }
54
55 // /**
56 // * Force load the library.
57 // *
58 // * @throws IOException if the library load failed
59 // */
60 // public static synchronized void forceLoad() throws IOException {
61 // if (libraryLoaded) {
62 // return;
63 // }
64 // RuntimeLoader.loadLibrary("wpimathjni");
65 // libraryLoaded = true;
66 // }
67
68 // /** Utility class. */
69 // protected WPIMathJNI() {}
70}