public final class SLNull extends Object implements com.oracle.truffle.api.interop.TruffleObject
null (i.e., undefined) value. In Truffle, it is generally discouraged
to use the Java null value to represent the guest language null value. It is not
possible to specialize on Java null (since you cannot ask it for the Java class), and
there is always the danger of a spurious NullPointerException. Representing the guest
language null as a singleton, as in this class, is the recommended
practice.| Modifier and Type | Field and Description |
|---|---|
static SLNull |
SINGLETON
The canonical value to represent
null in SL. |
| Modifier and Type | Method and Description |
|---|---|
String |
toString()
This method is, e.g., called when using the
null value in a string concatenation. |
public static final SLNull SINGLETON
null in SL.