Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jruby.java.invokers;
 
 
public class InstanceFieldGetter extends FieldMethodZero {
    public InstanceFieldGetter(String nameRubyModule hostField field) {
        super(namehostfield);
    }
    @Override
    public IRubyObject call(ThreadContext contextIRubyObject selfRubyModule clazzString name) {
        try {
            JavaProxy proxy = InstanceMethodInvoker.castJavaProxy(self);
            return JavaUtil.convertJavaToUsableRubyObject(context.runtime.get(proxy.getObject()));
        } catch (IllegalAccessException iae) {
            throw context.runtime.newTypeError("illegal access getting variable: " + iae.getMessage());
        }
    }
New to GrepCode? Check out our FAQ X