Package org.jruby

Examples of org.jruby.Ruby.callEventHooks()


           
            if (argsAsIs) {
                boolean isTrace = runtime.hasEventHooks();
                try {
                    if (isTrace) {
                        runtime.callEventHooks(context, RubyEvent.C_CALL, context.getFile(), context.getLine(), name, getImplementationClass());
                   
                    return (IRubyObject)method.invoke(self, (Object[])args);
                } finally {
                    if (isTrace) {
                        runtime.callEventHooks(context, RubyEvent.C_RETURN, context.getFile(), context.getLine(), name, getImplementationClass());
View Full Code Here


                        runtime.callEventHooks(context, RubyEvent.C_CALL, context.getFile(), context.getLine(), name, getImplementationClass());
                   
                    return (IRubyObject)method.invoke(self, (Object[])args);
                } finally {
                    if (isTrace) {
                        runtime.callEventHooks(context, RubyEvent.C_RETURN, context.getFile(), context.getLine(), name, getImplementationClass());
                    }
                }                   
            } else {
                int argsLength = calcArgsLength();
               
View Full Code Here

                }
               
                boolean isTrace = runtime.hasEventHooks();
                try {
                    if (isTrace) {
                        runtime.callEventHooks(context, RubyEvent.C_CALL, context.getFile(), context.getLine(), name, getImplementationClass());
                    }
                    IRubyObject result;
                    if (isStatic) {
                        result = (IRubyObject)method.invoke(null, params);
                    } else {
View Full Code Here

                    }

                    return result == null ? runtime.getNil() : result;
                } finally {
                    if (isTrace) {
                        runtime.callEventHooks(context, RubyEvent.C_RETURN, context.getFile(), context.getLine(), name, getImplementationClass());
                    }
                }
            }
        } catch (IllegalArgumentException e) {
            throw RaiseException.createNativeRaiseException(runtime, e, method);
View Full Code Here

        int callNumber = context.callNumber;
        try {
            boolean isTrace = runtime.hasEventHooks();
            try {
                if (isTrace) {
                    runtime.callEventHooks(context, RubyEvent.CALL, position.getFile(), position.getLine(), name, getImplementationClass());
                }
                return (IRubyObject)method.invoke(null, $scriptObject, context, self, args, block);
            } finally {
                if (isTrace) {
                    runtime.callEventHooks(context, RubyEvent.RETURN, context.getFile(), context.getLine(), name, getImplementationClass());
View Full Code Here

                    runtime.callEventHooks(context, RubyEvent.CALL, position.getFile(), position.getLine(), name, getImplementationClass());
                }
                return (IRubyObject)method.invoke(null, $scriptObject, context, self, args, block);
            } finally {
                if (isTrace) {
                    runtime.callEventHooks(context, RubyEvent.RETURN, context.getFile(), context.getLine(), name, getImplementationClass());
                }
            }
           
        } catch (IllegalArgumentException e) {
            throw RaiseException.createNativeRaiseException(runtime, e, method);
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.