public final class JSMetaType extends Object implements com.oracle.truffle.api.interop.TruffleObject
JavaScriptLanguageView.
Note that JS objects usually return their constructor function object as the meta object.| Modifier and Type | Class and Description |
|---|---|
static interface |
JSMetaType.TypeCheck |
| Modifier and Type | Field and Description |
|---|---|
static JSMetaType |
ARRAY |
static JSMetaType |
BOOLEAN |
static JSMetaType |
DATE |
static JSMetaType |
FUNCTION |
static JSMetaType |
JS_BIGINT |
static JSMetaType |
JS_NULL |
static JSMetaType |
JS_PROXY |
static JSMetaType |
JS_SYMBOL |
static JSMetaType |
JS_UNDEFINED |
static JSMetaType |
NULL |
static JSMetaType |
NUMBER |
static JSMetaType |
OBJECT |
static JSMetaType |
STRING |
| Constructor and Description |
|---|
JSMetaType(String typeName,
JSMetaType.TypeCheck isInstance) |
| Modifier and Type | Method and Description |
|---|---|
String |
getTypeName() |
boolean |
isInstance(Object instance,
com.oracle.truffle.api.interop.InteropLibrary interop)
Checks whether
instance is of this meta type. |
String |
toString() |
public static final JSMetaType NULL
public static final JSMetaType BOOLEAN
public static final JSMetaType STRING
public static final JSMetaType NUMBER
public static final JSMetaType FUNCTION
public static final JSMetaType DATE
public static final JSMetaType ARRAY
public static final JSMetaType OBJECT
public static final JSMetaType JS_NULL
public static final JSMetaType JS_UNDEFINED
public static final JSMetaType JS_BIGINT
public static final JSMetaType JS_SYMBOL
public static final JSMetaType JS_PROXY
public JSMetaType(String typeName, JSMetaType.TypeCheck isInstance)
public boolean isInstance(Object instance, com.oracle.truffle.api.interop.InteropLibrary interop)
instance is of this meta type. If used on the fast path the
JSMetaType is required to be a PE-constant.public String getTypeName()