Force a read of the given field from native memory. The Java field will be updated from the current contents of native memory. @param name field to be read @return the new field value, after updating @throws IllegalArgumentException if no field exists with the given name
(String name)
| 637 | * @throws IllegalArgumentException if no field exists with the given name |
| 638 | */ |
| 639 | public Object readField(String name) { |
| 640 | ensureAllocated(); |
| 641 | StructField f = fields().get(name); |
| 642 | if (f == null) |
| 643 | throw new IllegalArgumentException("No such field: " + name); |
| 644 | return readField(f); |
| 645 | } |
| 646 | |
| 647 | /** Obtain the value currently in the Java field. Does not read from |
| 648 | * native memory. |
no test coverage detected