/** * Explicitely exports a symbol to the polyglot bindings object. The behavior of this method * is equivalent to sending a WRITE message to the {@link #getPolyglotBindings() polyglot * bindings} object. Exporting a symbol with a <code>null</code> value will remove the * symbol from the polyglot object. * <p> * The exported symbol value can either be a <code>TruffleObject</code> (e.g. a native * object from the other language) to support interoperability between languages, * {@link String} or one of the Java primitive wrappers ( {@link Integer}, {@link Double}, * {@link Byte}, {@link Boolean}, etc.). * * @param symbolName the name with which the symbol should be exported into the polyglot * scope * @param value the value to export for * @since 0.27 */ @TruffleBoundary public void exportSymbol(String symbolName, Object value) { AccessAPI.engineAccess().exportSymbol(vmObject, symbolName, value); }
/** * Explicitly exports a symbol to the polyglot bindings object. The behavior of this method * is equivalent to sending a WRITE message to the {@link #getPolyglotBindings() polyglot * bindings} object. Exporting a symbol with a <code>null</code> value will remove the * symbol from the polyglot object. * <p> * The exported symbol value can either be a <code>TruffleObject</code> (e.g. a native * object from the other language) to support interoperability between languages, * {@link String} or one of the Java primitive wrappers ( {@link Integer}, {@link Double}, * {@link Byte}, {@link Boolean}, etc.). * * @param symbolName the name with which the symbol should be exported into the polyglot * scope * @param value the value to export for * @since 0.27 */ @TruffleBoundary public void exportSymbol(String symbolName, Object value) { AccessAPI.engineAccess().exportSymbol(vmObject, symbolName, value); }