01: /*
02: * EventHooke.java
03: *
04: * Created on May 26, 2007, 3:12:11 PM
05: *
06: * To change this template, choose Tools | Template Manager
07: * and open the template in the editor.
08: */
09:
10: package org.jruby.runtime;
11:
12: import org.jruby.runtime.builtin.IRubyObject;
13:
14: /**
15: *
16: * @author headius
17: */
18: public interface EventHook {
19: public static final int RUBY_EVENT_LINE = 0;
20: public static final int RUBY_EVENT_CLASS = 1;
21: public static final int RUBY_EVENT_END = 2;
22: public static final int RUBY_EVENT_CALL = 3;
23: public static final int RUBY_EVENT_RETURN = 4;
24: public static final int RUBY_EVENT_C_CALL = 5;
25: public static final int RUBY_EVENT_C_RETURN = 6;
26: public static final int RUBY_EVENT_RAISE = 7;
27:
28: public static final String[] EVENT_NAMES = { "line", "class",
29: "end", "call", "return", "c-call", "c-return", "raise" };
30:
31: public void event(ThreadContext context, int event, String file,
32: int line, String name, IRubyObject type);
33:
34: public boolean isInterestedInEvent(int event);
35: }
|