Search in sources :

Example 1 with ChangeReceiver

use of com.scratchdisk.script.ChangeReceiver in project scriptographer by scriptographer.

the class ExtendedJavaObject method get.

public Object get(String name, Scriptable start) {
    // defined in the underlying Java object
    if (properties != null && properties.containsKey(name))
        return properties.get(name);
    if (changeReceiver != null)
        fetchChangeReceiver();
    Scriptable prototype = getPrototype();
    Object result = prototype.get(name, this);
    if (result != Scriptable.NOT_FOUND)
        return result;
    result = members.get(this, name, javaObject, false);
    if (result != Scriptable.NOT_FOUND) {
        if (javaObject instanceof ChangeReceiver)
            handleChangeEmitter(result, name);
        return result;
    }
    if (name.equals("prototype"))
        return prototype;
    return Scriptable.NOT_FOUND;
}
Also used : ChangeReceiver(com.scratchdisk.script.ChangeReceiver) NativeJavaObject(org.mozilla.javascript.NativeJavaObject) ScriptableObject(org.mozilla.javascript.ScriptableObject) Scriptable(org.mozilla.javascript.Scriptable)

Aggregations

ChangeReceiver (com.scratchdisk.script.ChangeReceiver)1 NativeJavaObject (org.mozilla.javascript.NativeJavaObject)1 Scriptable (org.mozilla.javascript.Scriptable)1 ScriptableObject (org.mozilla.javascript.ScriptableObject)1