Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.dynjs.runtime.linker.js.object;
 
import static java.lang.invoke.MethodHandles.lookup;
import static java.lang.invoke.MethodType.methodType;

Author(s):
Bob McWhirter
public class JSObjectPropertyGetLink extends SmartLink implements Guard {
    public JSObjectPropertyGetLink(LinkBuilder builderthrows Exception {
        super(builder);
        this. = this..guardWiththis );
    }
    public boolean guard(Object receiverObject contextString propertyName) {
        return (receiver instanceof Reference) && (((Referencereceiver).getBase() instanceof JSObject);
    }
    @Override
    public MethodHandle guardMethodHandle(MethodType inputTypethrows Exception {
        return lookup()
                .findVirtual(JSObjectPropertyGetLink.class"guard"methodType(boolean.classObject.classObject.classString.class))
                .bindTo(this);
    }
    public MethodHandle guard() throws Exception {
        return this..getGuard();
    }
    public MethodHandle target() throws Exception {
        return this.
                //.permute(0, 1, 2, 3 )
                .filter(0, .)
                .convertObject.classJSObject.classExecutionContext.classString.class )
                .invoke(lookup().findVirtual(JSObject.class"get"methodType(Object.classExecutionContext.classString.class)))
                .target();
    }
New to GrepCode? Check out our FAQ X