You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/user/polyglot.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,8 +151,7 @@ It is easier to use Java interoperability in JVM mode (`--jvm`). Java interopera
151
151
See [here](https://github.com/oracle/graal/blob/master/docs/reference-manual/embedding/embed-languages.md#build-native-images-from-polyglot-applications) for more details.
152
152
153
153
`Java.type('name')` returns a Java type, given a name such as `java.lang.Integer` or `int[]`.
154
-
With the type object, `.new` will create an instance, `.foo` will call the static method `foo`, `[:FOO]` will read the static field
155
-
`FOO`, and so on.
154
+
With the type object, `.new` will create an instance, `.foo` will call the static method `foo`, `.FOO` or `[:FOO]` will read the static field `FOO`, and so on.
156
155
To access methods of the `java.lang.Class` instance, use `[:class]`, such as `MyClass[:class].getName`.
157
156
You can also go from the `java.lang.Class` instance to the Java type by using `[:static]`.
0 commit comments