/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
- bsh.help.super = "usage: super( methodname )";
- /**
- This implementation of this is fragile...
- */
- bsh.This super( String scope ) {
- n=this.caller.namespace;
- while ( n != global ) {
- if ( n.namespace.getName().equals( "Method NameSpace: "+ scope ) )
- return n;
- else
- n=n.super;
- }
- if ( n == global)
- throw new EvalError("Enclosing scope not found: "+scope);
- }