Package org.javagi.gobject
Class ValueUtil
java.lang.Object
org.javagi.gobject.ValueUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable ValueAllocate and initialize a new GValue, and copysrcinto it.static booleanobjectToValue(@Nullable Object src, @Nullable Value dest) Read the GType of thedestGValue and set thesrcobject (or boxed primitive value) as its value using the corresponding setter in theValueproxy class.static @Nullable ObjectvalueToObject(@Nullable Value src) Read the GType from the GValue, call the corresponding getter (using the methods defined in theValueproxy class), and return the result.
-
Constructor Details
-
ValueUtil
public ValueUtil()
-
-
Method Details
-
valueToObject
Read the GType from the GValue, call the corresponding getter (using the methods defined in theValueproxy class), and return the result.- Parameters:
src- a GValue instance.- Returns:
- a Java object (or boxed primitive value) that has been
marshaled from the GValue, or
nullifsrcis null.
-
objectToValue
Read the GType of thedestGValue and set thesrcobject (or boxed primitive value) as its value using the corresponding setter in theValueproxy class.- Parameters:
src- the Java Object (or boxed primitive value) to put in the GValue. Should not benulldest- the GValue to write to. Should not benull- Returns:
trueif the value was set, andfalseotherwise.
-
copy
-