/** * Copyright (c) 2012-2016 André Bargull * Alle Rechte vorbehalten / All Rights Reserved. Use is subject to license terms. * * <https://github.com/anba/es6draft> */ package com.github.anba.es6draft.runtime.objects.async.iteration; import static com.github.anba.es6draft.runtime.internal.Properties.createProperties; import com.github.anba.es6draft.runtime.ExecutionContext; import com.github.anba.es6draft.runtime.Realm; import com.github.anba.es6draft.runtime.internal.Initializable; import com.github.anba.es6draft.runtime.internal.Properties.Function; import com.github.anba.es6draft.runtime.internal.Properties.Prototype; import com.github.anba.es6draft.runtime.types.BuiltinSymbol; import com.github.anba.es6draft.runtime.types.Intrinsics; import com.github.anba.es6draft.runtime.types.builtins.OrdinaryObject; /** * The %AsyncIteratorPrototype% Object */ public final class AsyncIteratorPrototype extends OrdinaryObject implements Initializable { /** * Constructs a new AsyncIterator prototype object. * * @param realm * the realm object */ public AsyncIteratorPrototype(Realm realm) { super(realm); } @Override public void initialize(Realm realm) { createProperties(realm, this, Properties.class); } /** * Properties of AsyncIterator Prototype */ public enum Properties { ; @Prototype public static final Intrinsics __proto__ = Intrinsics.ObjectPrototype; /** * %AsyncIteratorPrototype% [ @@asyncIterator ] ( ) * * @param cx * the execution context * @param thisValue * the function this-value * @return the this-value */ @Function(name = "[Symbol.asyncIterator]", symbol = BuiltinSymbol.asyncIterator, arity = 0) public static Object asyncIterator(ExecutionContext cx, Object thisValue) { return thisValue; } } }