PageRenderTime 39ms CodeModel.GetById 18ms 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. This is equivalent to the standard Class.forName() method for class loading,
  6. however it takes advantage of the BeanShell class manager so that added
  7. classpath will be taken into account. You can also use Class.forName(),
  8. however if you have modified the classpath or reloaded classes from within
  9. your script the modifications will only appear if you use the getClass()
  10. command.
  11. */
  12. bsh.help.getClass= "usage: getClass( String name )";
  13. Class getClass( String name ) {
  14. return this.caller.namespace.getClass( name );
  15. }