private static String classNameFromSource(Source source){
  if (source.isSourcePathOwner() || source.isSourceListOwner()) {
    return source.getShortName();
  }
 else   if (source.isSwcScriptOwner() || source.getCompilationUnit() != null) {
    return source.getCompilationUnit().topLevelDefinitions.first().getLocalPart();
  }
 else {
    assert false;
    return null;
  }
}

private static String classNameFromSource ( Source source ) { if ( source . isSourcePathOwner ( ) || source . isSourceListOwner ( ) ) { return source . getShortName ( ) ; } else if ( source . isSwcScriptOwner ( ) || source . getCompilationUnit ( ) != null ) { return source . getCompilationUnit ( ) . topLevelDefinitions . first ( ) . getLocalPart ( ) ; } else { assert false ; return null ; } }
derive class name from file path
