Examples of fastGetInstanceVariable()


Examples of org.jruby.RubyClass.fastGetInstanceVariable()

            return isExceptionHandled(((RaiseException)currentException).getException(), exceptions, runtime, context, self);
        } else {
            for (int i = 0; i < exceptions.length; i++) {
                if (exceptions[i] instanceof RubyClass) {
                    RubyClass rubyClass = (RubyClass)exceptions[i];
                    JavaClass javaClass = (JavaClass)rubyClass.fastGetInstanceVariable("@java_class");
                    if (javaClass != null) {
                        Class cls = javaClass.javaClass();
                        if (cls.isInstance(currentException)) {
                            return runtime.getTrue();
                        }
View Full Code Here

Examples of org.jruby.RubyClass.fastGetInstanceVariable()

            // let Ruby exceptions decide if they handle it
            return isExceptionHandled(JavaUtil.convertJavaToUsableRubyObject(context.getRuntime(), throwable), catchable, context).isTrue();
        }
        if (catchable instanceof RubyClass && catchable.getInstanceVariables().hasInstanceVariable("@java_class")) {
            RubyClass rubyClass = (RubyClass)catchable;
            JavaClass javaClass = (JavaClass)rubyClass.fastGetInstanceVariable("@java_class");
            if (javaClass != null) {
                Class cls = javaClass.javaClass();
                if (cls.isInstance(throwable)) {
                    return true;
                }
View Full Code Here

Examples of org.jruby.runtime.builtin.InstanceVariables.fastGetInstanceVariable()

    static void updateInstanceVar(RubyObject receiver, BiVariableMap vars) {
        InstanceVariables ivars = receiver.getInstanceVariables();
        List<String> keys = ivars.getInstanceVariableNameList();
        for (String key : keys) {
            IRubyObject value = ivars.fastGetInstanceVariable(key);
            BiVariable var = vars.getVariable(receiver, key);
            if (var != null) {
                var.setRubyObject(value);
            } else {
                var = new InstanceVariable(receiver, key, value);
View Full Code Here

Examples of org.jruby.runtime.builtin.InstanceVariables.fastGetInstanceVariable()

        // if the specified key doesn't exist, this method is called before the
        // evaluation. Don't update value in this case.
        if (!ivars.getInstanceVariableNameList().contains(key)) return;

        // the specified key is found, so let's update
        IRubyObject value = ivars.fastGetInstanceVariable(key);
        BiVariable var = vars.getVariable(receiver, key);
        if (var != null) {
            var.setRubyObject(value);
        } else {
            var = new InstanceVariable(receiver, key, value);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.