Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Java.GetObjectField
Queries a field on an object.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Java | 6.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No |
Parameters
Parameter | Description | Example |
---|---|---|
JObject | The java object reference number. | $j |
FieldName | The name of the field. | "test" |
Signature | The java signature of the field. This describes the data type of the field. |
"I" |
Result
Returns value or error.
Description
Queries a field on an object.Data type is automatically detected by plugin from signature.
If you read an object value, please call Java.Release later for it.
Java is only available if you call Java.Initialize before to load the java runtime.
Supported data types include: void, int, long, boolean, string, double, float, char, byte, object, byte array (for container), char array (using FileMaker text).
For PDF content: If you have a DynaPDF Pro license and DynaPDF functions initialized, this function can add previews for the PDF file on Windows and Linux. For MacOS, we make them with PDFKit.
Examples
Test object field:
Set Variable [$j; Value:MBS( "Java.NewClassObject"; "test"; "<init>"; "()V")]
Set Variable [$r; Value:MBS( "Java.SetObjectField"; $j; "value"; "I"; 2345)]
Set Variable [$r; Value:MBS( "Java.GetObjectField"; $j; "value"; "I")]
Show Custom Dialog ["value"; $r]
Set Variable [$r; Value:MBS( "Java.Release"; $j)]
Queries various fields:
Set Variable [$r; Value:MBS( "Java.GetObjectField"; $j; "property_boolean"; "Z")]
Set Variable [$r; Value:MBS( "Java.GetObjectField"; $j; "property_byte"; "B")]
Set Variable [$r; Value:MBS( "Java.GetObjectField"; $j; "property_byteArray"; "[B")]
Set Variable [$r; Value:MBS( "Java.GetObjectField"; $j; "property_char"; "C")]
Set Variable [$r; Value:MBS( "Java.GetObjectField"; $j; "property_charArray"; "[C")]
Set Variable [$r; Value:MBS( "Java.GetObjectField"; $j; "property_double"; "D")]
Set Variable [$r; Value:MBS( "Java.GetObjectField"; $j; "property_float"; "F")]
Set Variable [$r; Value:MBS( "Java.GetObjectField"; $j; "property_int"; "I")]
Set Variable [$r; Value:MBS( "Java.GetObjectField"; $j; "property_long"; "J")]
Set Variable [$r; Value:MBS( "Java.GetObjectField"; $j; "property_short"; "S")]
Set Variable [$r; Value:MBS( "Java.GetObjectField"; $j; "property_string"; "Ljava/lang/String;")]
See also
Example Databases
This function checks for a license.
Created 2nd October 2016, last changed 9th November 2021