|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Variable<T>
Access library global variables.
To access global variables, declare a method with a parameterized return type of this class.
Example
public interface MyLib {
public Variable<Long> my_int_var();
}
MyLib lib = LibraryLoader.create(MyLib.class).load("mylib"):
System.out.println("native value=" + lib.my_int_var().get())
lib.my_int_var().set(0xdeadbeef);
| Method Summary | |
|---|---|
T |
get()
Gets the current value of the global variable |
void |
set(T value)
Sets the global variable to a value |
| Method Detail |
|---|
T get()
void set(T value)
value - The value to set the global variable to.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||