All Downloads are FREE. Search and download functionalities are using the official Maven repository.

js.util.ProxyHandler Maven / Gradle / Ivy

package js.util;

import js.lang.Any;
import js.lang.PropertyDescriptor;
import js.lang.Unknown;
import org.teavm.jso.JSFunctor;
import org.teavm.jso.JSObject;
import org.teavm.jso.JSProperty;


public interface ProxyHandler extends Any {
    @JSProperty
    void setGetPrototypeOf(Getter getPrototypeOf);

    @JSProperty
    void setSetPrototypeOf(PropertyBooleanFunction setPrototypeOf);

    @JSProperty
    void setIsExtensible(BooleanGetter isExtensible);

    @JSProperty
    void setPreventExtensions(BooleanGetter preventExtensions);

    @JSProperty
    void setGetOwnPropertyDescriptor(PropertyDescriptorGetter getOwnPropertyDescriptor);

    @JSProperty
    void setHas(PropertyBooleanFunction has);

    @JSProperty
    void setGet(PropertyGetter get);

    @JSProperty
    void setSet(Setter set);

    @JSProperty
    void setDeleteProperty(PropertyBooleanFunction deleteProperty);

    @JSProperty
    void setDefineProperty(DefineProperty defineProperty);

    @JSProperty
    void setEnumerate(Getter enumerate);

    @JSProperty
    void setOwnKeys(Getter enumerate);

    @JSProperty
    void setApply(Apply apply);

    @JSProperty
    void setConstruct(Constructor apply);

    @JSFunctor
    @FunctionalInterface
    interface Getter extends JSObject {
        Any get(T target);
    }

    @JSFunctor
    @FunctionalInterface
    interface Constructor extends JSObject {
        Any apply(T1 target, Unknown... arguments);
    }

    @JSFunctor
    @FunctionalInterface
    interface PropertyDescriptorGetter extends JSObject {
        PropertyDescriptor get(T1 target, Unknown key);
    }

    @JSFunctor
    @FunctionalInterface
    interface Apply extends JSObject {
        Any apply(T1 target, Unknown thisArg, Unknown... arguments);
    }

    @JSFunctor
    @FunctionalInterface
    interface PropertyGetter extends JSObject {
        Any get(T1 target, Unknown key, Proxy receiver);
    }

    @JSFunctor
    @FunctionalInterface
    interface BooleanGetter extends JSObject {
        boolean test(T target);
    }

    @JSFunctor
    @FunctionalInterface
    interface PropertyBooleanFunction extends JSObject {
        boolean apply(T1 target, Unknown key);
    }

    @JSFunctor
    @FunctionalInterface
    interface PrototypeSetter extends JSObject {
        boolean set(T1 target, Unknown prototype);
    }

    @JSFunctor
    @FunctionalInterface
    interface DefineProperty extends JSObject {
        boolean define(T1 target, Unknown key, PropertyDescriptor descriptor);
    }

    @JSFunctor
    @FunctionalInterface
    interface Setter extends JSObject {
        boolean apply(T1 target, Unknown key, Unknown value, Proxy receiver);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy