Class Value

java.lang.Object
me.topchetoeu.j2s.runtime.values.Value
Direct Known Subclasses:
ObjectValue, PrimitiveValue, UserValue

public abstract class Value extends Object
  • Field Details

    • BOOL_PROTO

      public static final me.topchetoeu.j2s.common.Key<ObjectValue> BOOL_PROTO
    • NUMBER_PROTO

      public static final me.topchetoeu.j2s.common.Key<ObjectValue> NUMBER_PROTO
    • STRING_PROTO

      public static final me.topchetoeu.j2s.common.Key<ObjectValue> STRING_PROTO
    • SYMBOL_PROTO

      public static final me.topchetoeu.j2s.common.Key<ObjectValue> SYMBOL_PROTO
    • OBJECT_PROTO

      public static final me.topchetoeu.j2s.common.Key<ObjectValue> OBJECT_PROTO
    • FUNCTION_PROTO

      public static final me.topchetoeu.j2s.common.Key<ObjectValue> FUNCTION_PROTO
    • ARRAY_PROTO

      public static final me.topchetoeu.j2s.common.Key<ObjectValue> ARRAY_PROTO
    • INT8_ARR_PROTO

      public static final me.topchetoeu.j2s.common.Key<ObjectValue> INT8_ARR_PROTO
    • INT32_ARR_PROTO

      public static final me.topchetoeu.j2s.common.Key<ObjectValue> INT32_ARR_PROTO
    • UINT8_ARR_PROTO

      public static final me.topchetoeu.j2s.common.Key<ObjectValue> UINT8_ARR_PROTO
    • ERROR_PROTO

      public static final me.topchetoeu.j2s.common.Key<ObjectValue> ERROR_PROTO
    • SYNTAX_ERR_PROTO

      public static final me.topchetoeu.j2s.common.Key<ObjectValue> SYNTAX_ERR_PROTO
    • TYPE_ERR_PROTO

      public static final me.topchetoeu.j2s.common.Key<ObjectValue> TYPE_ERR_PROTO
    • RANGE_ERR_PROTO

      public static final me.topchetoeu.j2s.common.Key<ObjectValue> RANGE_ERR_PROTO
    • GLOBAL

      public static final me.topchetoeu.j2s.common.Key<Value> GLOBAL
    • INTRINSICS

      public static final me.topchetoeu.j2s.common.Key<Map<String,Value>> INTRINSICS
    • UNDEFINED

      public static final VoidValue UNDEFINED
    • NULL

      public static final VoidValue NULL
  • Constructor Details

    • Value

      public Value()
  • Method Details

    • type

      public abstract StringValue type()
    • isPrimitive

      public abstract boolean isPrimitive()
    • isNaN

      public final boolean isNaN()
    • apply

      public Value apply(me.topchetoeu.j2s.common.Environment env, Value self, Value... args)
    • construct

      public Value construct(me.topchetoeu.j2s.common.Environment env, Value target, Value... args)
    • constructNoSelf

      public final Value constructNoSelf(me.topchetoeu.j2s.common.Environment env, Value... args)
    • toPrimitive

      public abstract Value toPrimitive(me.topchetoeu.j2s.common.Environment env)
    • toNumber

      public abstract NumberValue toNumber(me.topchetoeu.j2s.common.Environment env)
    • toString

      public abstract String toString(me.topchetoeu.j2s.common.Environment env)
    • toBoolean

      public abstract boolean toBoolean()
    • isInstanceOf

      public final boolean isInstanceOf(me.topchetoeu.j2s.common.Environment env, Value proto)
    • getOwnMember

      public abstract Member getOwnMember(me.topchetoeu.j2s.common.Environment env, KeyCache key)
    • getOwnMembers

      public abstract Set<String> getOwnMembers(me.topchetoeu.j2s.common.Environment env, boolean onlyEnumerable)
    • getOwnSymbolMembers

      public abstract Set<SymbolValue> getOwnSymbolMembers(me.topchetoeu.j2s.common.Environment env, boolean onlyEnumerable)
    • defineOwnField

      public abstract boolean defineOwnField(me.topchetoeu.j2s.common.Environment env, KeyCache key, Value val, Boolean writable, Boolean enumerable, Boolean configurable)
    • defineOwnProperty

      public abstract boolean defineOwnProperty(me.topchetoeu.j2s.common.Environment env, KeyCache key, Optional<FunctionValue> get, Optional<FunctionValue> set, Boolean enumerable, Boolean configurable)
    • deleteOwnMember

      public abstract boolean deleteOwnMember(me.topchetoeu.j2s.common.Environment env, KeyCache key)
    • getPrototype

      public abstract ObjectValue getPrototype(me.topchetoeu.j2s.common.Environment env)
    • setPrototype

      public abstract boolean setPrototype(me.topchetoeu.j2s.common.Environment env, ObjectValue val)
    • getState

      public abstract Value.State getState()
    • preventExtensions

      public abstract void preventExtensions()
    • seal

      public abstract void seal()
    • freeze

      public abstract void freeze()
    • getOwnMember

      public final Member getOwnMember(me.topchetoeu.j2s.common.Environment env, Value key)
    • getOwnMember

      public final Member getOwnMember(me.topchetoeu.j2s.common.Environment env, String key)
    • getOwnMember

      public final Member getOwnMember(me.topchetoeu.j2s.common.Environment env, int key)
    • getOwnMember

      public final Member getOwnMember(me.topchetoeu.j2s.common.Environment env, double key)
    • defineOwnProperty

      public final boolean defineOwnProperty(me.topchetoeu.j2s.common.Environment env, Value key, Optional<FunctionValue> get, Optional<FunctionValue> set, Boolean enumerable, Boolean configurable)
    • defineOwnProperty

      public final boolean defineOwnProperty(me.topchetoeu.j2s.common.Environment env, String key, Optional<FunctionValue> get, Optional<FunctionValue> set, Boolean enumerable, Boolean configurable)
    • defineOwnProperty

      public final boolean defineOwnProperty(me.topchetoeu.j2s.common.Environment env, int key, Optional<FunctionValue> get, Optional<FunctionValue> set, Boolean enumerable, Boolean configurable)
    • defineOwnProperty

      public final boolean defineOwnProperty(me.topchetoeu.j2s.common.Environment env, double key, Optional<FunctionValue> get, Optional<FunctionValue> set, Boolean enumerable, Boolean configurable)
    • defineOwnField

      public final boolean defineOwnField(me.topchetoeu.j2s.common.Environment env, Value key, Value val, Boolean writable, Boolean enumerable, Boolean configurable)
    • defineOwnField

      public final boolean defineOwnField(me.topchetoeu.j2s.common.Environment env, String key, Value val, Boolean writable, Boolean enumerable, Boolean configurable)
    • defineOwnField

      public final boolean defineOwnField(me.topchetoeu.j2s.common.Environment env, int key, Value val, Boolean writable, Boolean enumerable, Boolean configurable)
    • defineOwnField

      public final boolean defineOwnField(me.topchetoeu.j2s.common.Environment env, double key, Value val, Boolean writable, Boolean enumerable, Boolean configurable)
    • defineOwnField

      public final boolean defineOwnField(me.topchetoeu.j2s.common.Environment env, KeyCache key, Value val)
    • defineOwnField

      public final boolean defineOwnField(me.topchetoeu.j2s.common.Environment env, Value key, Value val)
    • defineOwnField

      public final boolean defineOwnField(me.topchetoeu.j2s.common.Environment env, String key, Value val)
    • defineOwnField

      public final boolean defineOwnField(me.topchetoeu.j2s.common.Environment env, int key, Value val)
    • defineOwnField

      public final boolean defineOwnField(me.topchetoeu.j2s.common.Environment env, double key, Value val)
    • deleteOwnMember

      public final boolean deleteOwnMember(me.topchetoeu.j2s.common.Environment env, Value key)
    • deleteOwnMember

      public final boolean deleteOwnMember(me.topchetoeu.j2s.common.Environment env, String key)
    • deleteOwnMember

      public final boolean deleteOwnMember(me.topchetoeu.j2s.common.Environment env, int key)
    • deleteOwnMember

      public final boolean deleteOwnMember(me.topchetoeu.j2s.common.Environment env, double key)
    • getMemberOrNull

      public final Value getMemberOrNull(me.topchetoeu.j2s.common.Environment env, KeyCache key)
    • getMemberOrNull

      public final Value getMemberOrNull(me.topchetoeu.j2s.common.Environment env, Value key)
    • getMemberOrNull

      public final Value getMemberOrNull(me.topchetoeu.j2s.common.Environment env, String key)
    • getMemberOrNull

      public final Value getMemberOrNull(me.topchetoeu.j2s.common.Environment env, int key)
    • getMemberOrNull

      public final Value getMemberOrNull(me.topchetoeu.j2s.common.Environment env, double key)
    • getMember

      public final Value getMember(me.topchetoeu.j2s.common.Environment env, KeyCache key)
    • getMember

      public final Value getMember(me.topchetoeu.j2s.common.Environment env, Value key)
    • getMember

      public final Value getMember(me.topchetoeu.j2s.common.Environment env, String key)
    • getMember

      public final Value getMember(me.topchetoeu.j2s.common.Environment env, int key)
    • getMember

      public final Value getMember(me.topchetoeu.j2s.common.Environment env, double key)
    • setMember

      public final boolean setMember(me.topchetoeu.j2s.common.Environment env, KeyCache key, Value val)
    • setMember

      public final boolean setMember(me.topchetoeu.j2s.common.Environment env, Value key, Value val)
    • setMember

      public final boolean setMember(me.topchetoeu.j2s.common.Environment env, String key, Value val)
    • setMember

      public final boolean setMember(me.topchetoeu.j2s.common.Environment env, int key, Value val)
    • setMember

      public final boolean setMember(me.topchetoeu.j2s.common.Environment env, double key, Value val)
    • setMemberIfExists

      public final boolean setMemberIfExists(me.topchetoeu.j2s.common.Environment env, KeyCache key, Value val)
    • setMemberIfExists

      public final boolean setMemberIfExists(me.topchetoeu.j2s.common.Environment env, Value key, Value val)
    • setMemberIfExists

      public final boolean setMemberIfExists(me.topchetoeu.j2s.common.Environment env, String key, Value val)
    • setMemberIfExists

      public final boolean setMemberIfExists(me.topchetoeu.j2s.common.Environment env, int key, Value val)
    • setMemberIfExists

      public final boolean setMemberIfExists(me.topchetoeu.j2s.common.Environment env, double key, Value val)
    • hasMember

      public final boolean hasMember(me.topchetoeu.j2s.common.Environment env, KeyCache key, boolean own)
    • hasMember

      public final boolean hasMember(me.topchetoeu.j2s.common.Environment env, Value key, boolean own)
    • hasMember

      public final boolean hasMember(me.topchetoeu.j2s.common.Environment env, String key, boolean own)
    • hasMember

      public final boolean hasMember(me.topchetoeu.j2s.common.Environment env, int key, boolean own)
    • hasMember

      public final boolean hasMember(me.topchetoeu.j2s.common.Environment env, double key, boolean own)
    • deleteMember

      public final boolean deleteMember(me.topchetoeu.j2s.common.Environment env, KeyCache key)
    • deleteMember

      public final boolean deleteMember(me.topchetoeu.j2s.common.Environment env, Value key)
    • deleteMember

      public final boolean deleteMember(me.topchetoeu.j2s.common.Environment env, String key)
    • deleteMember

      public final boolean deleteMember(me.topchetoeu.j2s.common.Environment env, int key)
    • deleteMember

      public final boolean deleteMember(me.topchetoeu.j2s.common.Environment env, double key)
    • getMembers

      public final Set<String> getMembers(me.topchetoeu.j2s.common.Environment env, boolean own, boolean onlyEnumerable)
    • getSymbolMembers

      public final Set<SymbolValue> getSymbolMembers(me.topchetoeu.j2s.common.Environment env, boolean own, boolean onlyEnumerable)
    • getMemberPath

      public final Value getMemberPath(me.topchetoeu.j2s.common.Environment env, String... path)
    • getMemberPath

      public final Value getMemberPath(me.topchetoeu.j2s.common.Environment env, Value... path)
    • getMemberDescriptor

      public final ObjectValue getMemberDescriptor(me.topchetoeu.j2s.common.Environment env, Value key)
    • toIterable

      public Iterable<Object> toIterable(me.topchetoeu.j2s.common.Environment env)
    • callWith

      public void callWith(me.topchetoeu.j2s.common.Environment env, Iterable<? extends Value> it)
    • callWithAsync

      public void callWithAsync(me.topchetoeu.j2s.common.Environment env, Iterable<? extends Value> it, boolean async)
    • toReadableLines

      public List<String> toReadableLines(me.topchetoeu.j2s.common.Environment env, HashSet<ObjectValue> passed)
    • toReadable

      public final String toReadable(me.topchetoeu.j2s.common.Environment ext)
    • global

      public static final Value global(me.topchetoeu.j2s.common.Environment env)
    • intrinsics

      public static final Map<String,Value> intrinsics(me.topchetoeu.j2s.common.Environment env)
    • fromIterator

      public static FunctionValue fromIterator(me.topchetoeu.j2s.common.Environment ext, Iterable<? extends Value> iterable)
    • lessOrEqual

      public static final boolean lessOrEqual(me.topchetoeu.j2s.common.Environment env, Value a, Value b)
    • greaterOrEqual

      public static final boolean greaterOrEqual(me.topchetoeu.j2s.common.Environment env, Value a, Value b)
    • less

      public static final boolean less(me.topchetoeu.j2s.common.Environment env, Value a, Value b)
    • greater

      public static final boolean greater(me.topchetoeu.j2s.common.Environment env, Value a, Value b)
    • add

      public static final Value add(me.topchetoeu.j2s.common.Environment env, Value a, Value b)
    • subtract

      public static final NumberValue subtract(me.topchetoeu.j2s.common.Environment env, Value a, Value b)
    • multiply

      public static final NumberValue multiply(me.topchetoeu.j2s.common.Environment env, Value a, Value b)
    • divide

      public static final NumberValue divide(me.topchetoeu.j2s.common.Environment env, Value a, Value b)
    • modulo

      public static final NumberValue modulo(me.topchetoeu.j2s.common.Environment env, Value a, Value b)
    • negative

      public static final NumberValue negative(me.topchetoeu.j2s.common.Environment env, Value a)
    • and

      public static final NumberValue and(me.topchetoeu.j2s.common.Environment env, Value a, Value b)
    • or

      public static final NumberValue or(me.topchetoeu.j2s.common.Environment env, Value a, Value b)
    • xor

      public static final NumberValue xor(me.topchetoeu.j2s.common.Environment env, Value a, Value b)
    • bitwiseNot

      public static final NumberValue bitwiseNot(me.topchetoeu.j2s.common.Environment env, Value a)
    • shiftLeft

      public static final NumberValue shiftLeft(me.topchetoeu.j2s.common.Environment env, Value a, Value b)
    • shiftRight

      public static final NumberValue shiftRight(me.topchetoeu.j2s.common.Environment env, Value a, Value b)
    • unsignedShiftRight

      public static final NumberValue unsignedShiftRight(me.topchetoeu.j2s.common.Environment env, Value a, Value b)
    • looseEqual

      public static final boolean looseEqual(me.topchetoeu.j2s.common.Environment env, Value a, Value b)
    • errorToReadable

      public static final String errorToReadable(me.topchetoeu.j2s.common.Environment env, RuntimeException err, String prefix)