PageRenderTime 79ms CodeModel.GetById 76ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-0-pre3/bsh/commands/which.bsh

#
Unknown | 19 lines | 15 code | 4 blank | 0 comment | 0 complexity | c407c0a9a23c0deec35db10f109ee322 MD5 | raw file
 1
 2bsh.help.which= "usage: which( classIdentifier | string | class )";
 3
 4import bsh.Name;
 5import bsh.BshClassManager;
 6/*
 7*/
 8which( clas ) { 
 9	// make the class into a name
10	if ( clas instanceof Name.ClassIdentifier )
11		clas = this.namespace.identifierToClass( clas );
12	if ( clas instanceof Class )
13		clas = clas.getName();
14	String className = clas;
15
16	cp = BshClassManager.getClassManager().getClassPath();
17	print ( cp.getClassSource( className ) );
18}
19