MCPcopy Index your code
hub / github.com/beanshell/beanshell / defineClass

Method defineClass

src/bsh/classpath/ClassManagerImpl.java:547–557  ·  view source on GitHub ↗
( String name, byte [] code )

Source from the content-addressed store, hash-verified

545 @exception ClassPathException can be thrown by reloadClasses
546 */
547 @Override
548 public Class defineClass( String name, byte [] code )
549 {
550 baseClassPath.setClassSource( name, new GeneratedClassSource( code ) );
551 try {
552 reloadClasses( new String [] { name } );
553 } catch ( ClassPathException e ) {
554 throw new bsh.InterpreterError("defineClass: "+e);
555 }
556 return classForName( name );
557 }
558
559 /**
560 Clear global class cache and notify namespaces to clear their

Callers 1

findClassMethod · 0.45

Calls 3

reloadClassesMethod · 0.95
classForNameMethod · 0.95
setClassSourceMethod · 0.80

Tested by

no test coverage detected