stateblock AbsoluteFileNames augments RFile {
requires FileNames;
addstate RFile.absoluteName: String;
// We assume the mapping between virtual and absolute names does not change
// during an execution. Is this true?
helper getAbsoluteName () returns String {
if (absoluteName == null) {
if (name == null) {
;
} else {
try {
File jfile = new File (name);
if (NCheck.isChecking ()) {
NCheck.noChecking ();
absoluteName = jfile.getCanonicalPath ();
NCheck.resumeChecking ();
} else {
absoluteName = jfile.getCanonicalPath ();
}
} catch (java.io.IOException e) {
//! what to do here?
throw new RuntimeException ("Cannot get canonical path: " + name);
}
}
}
return absoluteName;
}
}
Naccio Home Page
University of Virginia, Computer Science