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

Method mapClass

src/bsh/classpath/BshClassPath.java:382–401  ·  view source on GitHub ↗
( String className, Object source )

Source from the content-addressed store, hash-verified

380 }
381
382 private void mapClass( String className, Object source )
383 {
384 // add to package map
385 String [] sa = splitClassname( className );
386 String pack = sa[0];
387 String clas = sa[1];
388 Set set = (Set)packageMap.get( pack );
389 if ( set == null ) {
390 set = new HashSet();
391 packageMap.put( pack, set );
392 }
393 set.add( className );
394
395 // Add to classSource map
396 Object obj = classSource.get( className );
397 // don't replace previously set (found earlier in classpath or
398 // explicitly set via setClassSource() )
399 if ( obj == null )
400 classSource.put( className, source );
401 }
402
403 /**
404 Clear everything and reset the path to empty.

Callers 1

mapMethod · 0.95

Calls 4

splitClassnameMethod · 0.95
getMethod · 0.65
putMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected