source: trunk/j/src/bsh/commands/which.bsh @ 2

Last change on this file since 2 was 2, checked in by piso, 18 years ago

Initial checkin.

File size: 449 bytes
Line 
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
Note: See TracBrowser for help on using the repository browser.