PageRenderTime 37ms CodeModel.GetById 34ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-0-pre5/bsh/commands/super.bsh

#
Unknown | 18 lines | 15 code | 3 blank | 0 comment | 0 complexity | 21edb674864958df4e274cf93cb55e13 MD5 | raw file
 1
 2bsh.help.super = "usage: super( methodname )";
 3
 4/**
 5	This implementation of this is fragile... 
 6*/
 7bsh.This super( String scope ) {
 8	n=this.caller.namespace;
 9	while ( n != global ) {
10		if ( n.namespace.getName().equals( "Method NameSpace: "+ scope ) )
11			return n;
12		else
13			n=n.super;
14	}
15	if ( n == global)
16		throw new EvalError("Enclosing scope not found: "+scope);
17}
18