PageRenderTime 29ms CodeModel.GetById 23ms app.highlight 5ms RepoModel.GetById 0ms app.codeStats 0ms

/jEdit/tags/jedit-4-2-pre4/bsh/commands/getClass.bsh

#
Unknown | 18 lines | 15 code | 3 blank | 0 comment | 0 complexity | 12f5052771d7e34ab1908979594b8ed3 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
 1/**
 2	Get a class through the current namespace utilizing the current imports,
 3	extended classloader, etc.
 4	<p>
 5
 6	This is equivalent to the standard Class.forName() method for class loading,
 7	however it takes advantage of the BeanShell class manager so that added 
 8	classpath will be taken into account.  You can also use Class.forName(), 
 9	however if you have modified the classpath or reloaded classes from within 
10	your script the modifications will only appear if you use the getClass() 
11	command.
12*/
13bsh.help.getClass= "usage: getClass( String name )";
14
15Class getClass( String name ) {
16	return this.caller.namespace.getClass( name );
17}
18