MCPcopy Create free account
hub / github.com/beanshell/beanshell / definingClass

Method definingClass

src/bsh/BshClassManager.java:504–518  ·  view source on GitHub ↗
( String className )

Source from the content-addressed store, hash-verified

502 so we'll try it for now.
503 */
504 protected void definingClass( String className ) {
505 String baseName = Name.suffix(className,1);
506 int i = baseName.indexOf("$");
507 if ( i != -1 )
508 baseName = baseName.substring(i+1);
509 String cur = (String)definingClassesBaseNames.get( baseName );
510 if ( cur != null )
511 throw new InterpreterError("Defining class problem: "+className
512 +": BeanShell cannot yet simultaneously define two or more "
513 +"dependent classes of the same name. Attempt to define: "
514 + className +" while defining: "+cur
515 );
516 definingClasses.add( className );
517 definingClassesBaseNames.put( baseName, className );
518 }
519
520 protected boolean isClassBeingDefined( String className ) {
521 return definingClasses.contains( className );

Callers 1

generateClassImplMethod · 0.95

Calls 4

suffixMethod · 0.95
getMethod · 0.65
putMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected