package bluej.pkgmgr;
import java.io.File;
import java.io.FileNotFoundException;
import bluej.parser.InfoParser;
import bluej.parser.symtab.ClassInfo;
| A container holding information about a class's source file. The
| information is collected mainly by the class parser, and used for
| automatic editing of the source.
|
| @author Michael Kolling
| @version $Id: SourceInfo.java 16066 2016-06-21 20:19:57Z nccb $
|
public final class SourceInfo
{
private ClassInfo info;
public SourceInfo()
{
info = null;
}
public void setSourceModified()
{
info = null;
}
public ClassInfo getInfo(File sourceFile, Package pkg)
{
if (info == null)
{
try
{
info = InfoParser.parseWithPkg(sourceFile, pkg);
}
catch (FileNotFoundException fnfe)
{
}
}
return info;
}
| Similar to getInfo, but do not parse if info is not available.
| Instead, return null, if we got no info.
|
public ClassInfo getInfoIfAvailable()
{
return info;
}
}
. - SourceInfo
. SourceInfo
. setSourceModified
. getInfo
. getInfoIfAvailable
51 neLoCode
+ 7 LoComm