public SourceModel sourceForClass(ReferenceType refType){
  SourceModel sm=classToSource.get(refType);
  if (sm != null) {
    return sm;
  }
  try {
    String filename=refType.sourceName();
    String refName=refType.name();
    int iDot=refName.lastIndexOf('.');
    String pkgName=(iDot >= 0) ? refName.substring(0,iDot + 1) : "";
    String full=pkgName.replace('.',File.separatorChar) + filename;
    File path=sourcePath.resolve(full);
    if (path != null) {
      sm=sourceForFile(path);
      classToSource.put(refType,sm);
      return sm;
    }
    return null;
  }
 catch (  AbsentInformationException e) {
    return null;
  }
}

public SourceModel sourceForClass ( ReferenceType refType ) { SourceModel sm = classToSource . get ( refType ) ; if ( sm != null ) { return sm ; } try { String filename = refType . sourceName ( ) ; String refName = refType . name ( ) ; int iDot = refName . lastIndexOf ( '.' ) ; String pkgName = ( iDot >= 0 ) ? refName . substring ( 0 , iDot + 1 ) : "" ; String full = pkgName . replace ( '.' , File . separatorChar ) + filename ; File path = sourcePath . resolve ( full ) ; if ( path != null ) { sm = sourceForFile ( path ) ; classToSource . put ( refType , sm ) ; return sm ; } return null ; } catch ( AbsentInformationException e ) { return null ; } }
get source object associated with a class or interface . returns null if not available .
