MCPcopy Create free account
hub / github.com/beanshell/beanshell / event

Method event

src/bsh/JThis.java:80–112  ·  view source on GitHub ↗
(String name, Object event)

Source from the content-addressed store, hash-verified

78 }
79
80 void event(String name, Object event)
81 {
82 CallStack callstack = new CallStack( namespace );
83 BshMethod method = null;
84
85 // handleEvent gets all events
86 try {
87 method = namespace.getMethod(
88 "handleEvent", new Class [] { null } );
89 } catch ( UtilEvalError e ) {/*squeltch*/ }
90
91 if (method != null)
92 try {
93 method.invoke(
94 new Object[] { event }, declaringInterpreter, callstack, null );
95 } catch(EvalError e) {
96 declaringInterpreter.error(
97 "local event hander method invocation error:" + e );
98 }
99
100 // send to specific event handler
101 try {
102 method = namespace.getMethod( name, new Class [] { null } );
103 } catch ( UtilEvalError e ) { /*squeltch*/ }
104 if (method != null)
105 try {
106 method.invoke(
107 new Object[] { event }, declaringInterpreter, callstack, null );
108 } catch(EvalError e) {
109 declaringInterpreter.error(
110 "local event hander method invocation error:" + e );
111 }
112 }
113
114 // Listener interfaces
115

Callers 15

ancestorAddedMethod · 0.95
ancestorRemovedMethod · 0.95
ancestorMovedMethod · 0.95
caretUpdateMethod · 0.95
editingStoppedMethod · 0.95
editingCanceledMethod · 0.95
stateChangedMethod · 0.95
insertUpdateMethod · 0.95
removeUpdateMethod · 0.95
changedUpdateMethod · 0.95
hyperlinkUpdateMethod · 0.95
internalFrameOpenedMethod · 0.95

Calls 3

invokeMethod · 0.95
errorMethod · 0.65
getMethodMethod · 0.45

Tested by

no test coverage detected