Interface Value

All Known Subinterfaces:
NumberValue, PrimitiveValue
All Known Implementing Classes:
ArgumentsValue, ArrayLikeValue, ArrayValue, BoolValue, CodeFunction, DoubleValue, FunctionValue, IntValue, NativeFunction, ObjectValue, StringValue, SymbolValue, UserValue, VoidValue

public interface Value
  • Field Details

    • BOOL_PROTO

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      static final VoidValue UNDEFINED
    • NULL

      static final VoidValue NULL
  • Method Details

    • type

      StringValue type()
    • isPrimitive

      boolean isPrimitive()
    • isNaN

      default boolean isNaN()
    • apply

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

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

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

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

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

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

      boolean toBoolean()
    • getOwnMember

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

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

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

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

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

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

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

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

      Value.State getState()
    • preventExtensions

      void preventExtensions()
    • seal

      void seal()
    • freeze

      void freeze()
    • isInstanceOf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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