Represents an SL object.
This class defines operations that can be performed on SL Objects. While we could define all
these operations as individual AST nodes, we opted to define those operations by using
a Truffle library, or more concretely the
InteropLibrary. This has several advantages, but the primary one is that it allows SL
objects to be used in the interoperability message protocol, i.e. It allows other languages and
tools to operate on SL objects without necessarily knowing they are SL objects.
SL Objects are essentially instances of
DynamicObject (objects whose members can be
dynamically added and removed). We also annotate the class with
ExportLibrary with value
InteropLibrary.class. This essentially ensures that the build system and
runtime know that this class specifies the interop messages (i.e. operations) that SL can do on
SLObject instances.