Find a meta-object of a value, if any. The meta-object represents a description of the
object, reveals it's kind and it's features. Some information that a meta-object might define
includes the base object's type, interface, class, methods, attributes, etc.
A programmatic
#toString(java.lang.Object,java.lang.Object)should be provided for meta-objects, when possible. The meta-object may have properties
describing their structure.
NOTE: Allocating the meta object must not be treated as or cause any
com.oracle.truffle.api.instrumentation.AllocationListener
When no meta-object is known, return null
. The default implementation returns
null
. The meta-object should be an interop value. An interop value can be either
a TruffleObject
(e.g. a native object from the other language) to support
interoperability between languages or a
String.
It can be beneficial for performance to return the same value for each guest type (i.e. cache
the meta-objects per context).