public final class JSGuards extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
FALSE
false constant for use in DSL. |
static boolean |
TRUE
true constant for use in DSL. |
Modifier and Type | Method and Description |
---|---|
static Class<?> |
getClassIfJSDynamicObject(Object object) |
static Class<?> |
getClassIfJSObject(Object object) |
static Class<? extends Number> |
getJavaNumberClass(Object value) |
static JSClass |
getJSClassChecked(com.oracle.truffle.api.object.DynamicObject object) |
static JSClass |
getJSClassIfObject(com.oracle.truffle.api.object.DynamicObject object) |
static Class<?> |
getNonTruffleObjectClass(Object value) |
static boolean |
isArgumentsDisconnected(com.oracle.truffle.api.object.DynamicObject argumentsArray) |
static boolean |
isArrayIndexLengthInRange(String str) |
static boolean |
isBigInt(Object target) |
static boolean |
isBigIntNegativeVal(BigInt a) |
static boolean |
isBigIntZero(BigInt a) |
static boolean |
isBoolean(Object operand) |
static boolean |
isBoundJSFunction(Object value) |
static boolean |
isByteBuffer(Object buffer) |
static boolean |
isCallable(Object reviver) |
static boolean |
isCallableProxy(com.oracle.truffle.api.object.DynamicObject proxy) |
static boolean |
isDoubleInInt32Range(double value) |
static boolean |
isDoubleLargerThan2e32(double d) |
static boolean |
isDoubleRepresentableAsLong(double d) |
static boolean |
isDoubleSafeInteger(double d) |
static boolean |
isDynamicObject(Object value) |
static boolean |
isForeignObject(Object value) |
static boolean |
isIntArrayIndex(int i) |
static boolean |
isJavaArray(Object value) |
static boolean |
isJavaLangString(Object value) |
static boolean |
isJavaNumber(Object operand) |
static boolean |
isJavaPackage(Object target) |
static boolean |
isJavaPrimitive(Object value) |
static boolean |
isJavaPrimitiveNumber(Object value) |
static boolean |
isJSAdapter(Object object) |
static boolean |
isJSArgumentsObject(Object value) |
static boolean |
isJSArray(Object value) |
static boolean |
isJSArrayBufferView(Object thisObj) |
static boolean |
isJSBigInt(Object value) |
static boolean |
isJSBoolean(Object value) |
static boolean |
isJSCollator(Object value) |
static boolean |
isJSDate(Object value) |
static boolean |
isJSDateTimeFormat(Object value) |
static boolean |
isJSDirectArrayBuffer(Object thisObj) |
static boolean |
isJSDisplayNames(Object value) |
static boolean |
isJSDynamicObject(Object value)
Like isJSObject, but including Null and Undefined.
|
static boolean |
isJSFastArguments(Object value) |
static boolean |
isJSFastArray(Object value) |
static boolean |
isJSFinalizationRegistry(Object value) |
static boolean |
isJSFunction(Object value) |
static boolean |
isJSFunctionShape(com.oracle.truffle.api.object.Shape shape) |
static boolean |
isJSHeapArrayBuffer(Object thisObj) |
static boolean |
isJSListFormat(Object value) |
static boolean |
isJSLocale(Object value) |
static boolean |
isJSMap(Object value) |
static boolean |
isJSModuleNamespace(Object value) |
static boolean |
isJSNull(Object value) |
static boolean |
isJSNumber(Object value) |
static boolean |
isJSNumberFormat(Object value) |
static boolean |
isJSNumberInteger(com.oracle.truffle.api.object.DynamicObject thisObj)
Guard used to ensure that the parameter is a JSObject containing a JSNumber, that hosts an
Integer.
|
static boolean |
isJSObject(Object value)
Is this a DynamicObject representing a JavaScript object; this excludes Null and Undefined,
and excludes objects from other languages.
|
static boolean |
isJSObjectShape(com.oracle.truffle.api.object.Shape shape) |
static boolean |
isJSOrdinaryObject(Object value) |
static boolean |
isJSPluralRules(Object value) |
static boolean |
isJSProxy(Object value) |
static boolean |
isJSRegExp(Object value) |
static boolean |
isJSRelativeTimeFormat(Object value) |
static boolean |
isJSSegmenter(Object value) |
static boolean |
isJSSet(Object value) |
static boolean |
isJSSharedArrayBuffer(Object thisObj) |
static boolean |
isJSString(Object value) |
static boolean |
isJSSymbol(Object value) |
static boolean |
isJSWeakMap(Object value) |
static boolean |
isJSWeakRef(Object value) |
static boolean |
isJSWeakSet(Object value) |
static boolean |
isList(Object value) |
static boolean |
isLongArrayIndex(long i) |
static boolean |
isLongRepresentableAsInt32(long value) |
static boolean |
isNullOrUndefined(Object value) |
static boolean |
isNumber(Object operand) |
static boolean |
isNumberDouble(Object operand) |
static boolean |
isNumberInteger(Object operand) |
static boolean |
isNumberLong(Object operand) |
static boolean |
isReferenceEquals(Object a,
Object b) |
static boolean |
isString(Object operand) |
static boolean |
isSymbol(Object operand) |
static boolean |
isTruffleObject(Object value) |
static boolean |
isUndefined(Object value) |
static boolean |
isValidPrototype(Object prototype) |
public static final boolean FALSE
false
constant for use in DSL.public static final boolean TRUE
true
constant for use in DSL.public static boolean isJSObject(Object value)
public static boolean isJSDynamicObject(Object value)
public static boolean isTruffleObject(Object value)
public static boolean isJavaLangString(Object value)
public static boolean isForeignObject(Object value)
public static boolean isUndefined(Object value)
public static boolean isJSNull(Object value)
public static boolean isDynamicObject(Object value)
public static boolean isJSFunction(Object value)
public static boolean isJSFunctionShape(com.oracle.truffle.api.object.Shape shape)
public static boolean isBoundJSFunction(Object value)
public static boolean isCallable(Object reviver)
public static boolean isCallableProxy(com.oracle.truffle.api.object.DynamicObject proxy)
public static boolean isJSString(Object value)
public static boolean isJSNumber(Object value)
public static boolean isJSBigInt(Object value)
public static boolean isJSBoolean(Object value)
public static boolean isJSDate(Object value)
public static boolean isJSArray(Object value)
public static boolean isJSArgumentsObject(Object value)
public static boolean isJSRegExp(Object value)
public static boolean isJSOrdinaryObject(Object value)
public static boolean isJSDateTimeFormat(Object value)
public static boolean isJSCollator(Object value)
public static boolean isJSListFormat(Object value)
public static boolean isJSNumberFormat(Object value)
public static boolean isJSPluralRules(Object value)
public static boolean isJSRelativeTimeFormat(Object value)
public static boolean isJSSegmenter(Object value)
public static boolean isJSDisplayNames(Object value)
public static boolean isJSLocale(Object value)
public static boolean isNumber(Object operand)
public static boolean isJavaNumber(Object operand)
public static boolean isNumberInteger(Object operand)
public static boolean isNumberLong(Object operand)
public static boolean isNumberDouble(Object operand)
public static boolean isJSNumberInteger(com.oracle.truffle.api.object.DynamicObject thisObj)
public static boolean isString(Object operand)
public static boolean isBoolean(Object operand)
public static boolean isSymbol(Object operand)
public static boolean isJSHeapArrayBuffer(Object thisObj)
public static boolean isJSDirectArrayBuffer(Object thisObj)
public static boolean isJSSharedArrayBuffer(Object thisObj)
public static boolean isJSArrayBufferView(Object thisObj)
public static boolean isJSFastArray(Object value)
public static boolean isJSProxy(Object value)
public static boolean isJSFastArguments(Object value)
public static boolean isJSSymbol(Object value)
public static boolean isJSMap(Object value)
public static boolean isJSSet(Object value)
public static boolean isJSWeakRef(Object value)
public static boolean isJSFinalizationRegistry(Object value)
public static boolean isJSWeakMap(Object value)
public static boolean isJSWeakSet(Object value)
public static boolean isJSModuleNamespace(Object value)
public static boolean isJSAdapter(Object object)
public static boolean isValidPrototype(Object prototype)
public static boolean isByteBuffer(Object buffer)
public static boolean isList(Object value)
public static boolean isJavaPackage(Object target)
public static boolean isJavaArray(Object value)
public static boolean isBigInt(Object target)
public static boolean isBigIntZero(BigInt a)
public static boolean isBigIntNegativeVal(BigInt a)
public static boolean isDoubleInInt32Range(double value)
public static boolean isDoubleLargerThan2e32(double d)
public static boolean isLongRepresentableAsInt32(long value)
public static boolean isDoubleRepresentableAsLong(double d)
public static boolean isDoubleSafeInteger(double d)
public static boolean isIntArrayIndex(int i)
public static boolean isLongArrayIndex(long i)
public static boolean isArgumentsDisconnected(com.oracle.truffle.api.object.DynamicObject argumentsArray)
public static JSClass getJSClassChecked(com.oracle.truffle.api.object.DynamicObject object)
public static JSClass getJSClassIfObject(com.oracle.truffle.api.object.DynamicObject object)
public static boolean isJavaPrimitive(Object value)
public static boolean isJavaPrimitiveNumber(Object value)
public static boolean isNullOrUndefined(Object value)
public static boolean isJSObjectShape(com.oracle.truffle.api.object.Shape shape)
public static boolean isArrayIndexLengthInRange(String str)