|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjml2b.structure.java.JmlFile
Class keeping information on Java/JML files. It basically contains a set of classes.
Field Summary | |
JmlFileEntry |
fileName
FileName of the corresponding file (if any) |
static long |
jmlParserTime
|
static int |
JPO_FILE_FORMAT_VERSION
.jpo file |
static long |
loadedFilesCount
|
Constructor Summary | |
JmlFile()
|
|
JmlFile(java.io.File file_name,
antlr.collections.AST a)
|
|
JmlFile(JmlFileEntry file_name,
antlr.collections.AST a,
boolean external)
|
|
JmlFile(java.lang.String fileName,
java.util.Vector classes)
|
Method Summary | |
static Package |
addPackages(antlr.collections.AST ast,
Package pkg)
parse a package AST clause, adding packages as needed. |
java.lang.String |
emit(IJml2bConfiguration config)
|
java.util.Enumeration |
getClasses()
|
IJml2bConfiguration |
getConfig()
|
java.lang.Object |
getData(java.lang.Object key)
Retrieve data previously stored using storeData. |
java.util.Vector |
getDepends()
|
antlr.collections.AST |
getFileAST()
|
JmlFileEntry |
getFileName()
Return the filename corresponding to this file. |
java.lang.String |
getFileNameAbsolutePath()
|
java.lang.String |
getFlatName()
Returns the "flat name" for this JmlFile . |
Package |
getImportedClassPackage(java.lang.String class_name)
return the package corresponding to the given imported class. |
java.util.Enumeration |
getImportedPackages()
|
static long |
getJmlParserTime()
|
java.lang.String[] |
getLangNames()
|
static long |
getLoadedFilesCount()
|
int |
getNbPo()
|
int |
getNbPoProved()
|
int |
getNbPoProved(java.lang.String prover)
|
Package |
getPackage()
|
boolean |
isExternal()
Return true if the file correspond to an external file. |
boolean |
isImportedClass(java.lang.String class_name)
Return true if the given class_name correspond to an imported class. |
static boolean |
isJmlFile(java.lang.String s)
|
void |
link(IJml2bConfiguration config)
|
int |
linkStatements(IJml2bConfiguration config)
Links the statement parts of the file if needed. |
void |
mergeWith(JmlFile jf)
|
int |
parse(IJml2bConfiguration config)
Parse the file fills the package and import structures. |
void |
purgeObvious()
|
void |
removeData(java.lang.Object key)
Remove the data stored with the specified key. |
static void |
resetStats()
|
void |
save(IJml2bConfiguration config,
JpoOutputStream s)
.jpo file |
void |
setDepends(java.util.Vector depends)
Sets the depends. |
void |
storeData(java.lang.Object key,
java.lang.Object data)
Store the data using key so that the information can be retrieved using getUserData. |
void |
typeCheck(IJml2bConfiguration config)
Links the statement parts of the file if needed. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public JmlFileEntry fileName
public static long jmlParserTime
public static long loadedFilesCount
public static final int JPO_FILE_FORMAT_VERSION
Constructor Detail |
public JmlFile()
public JmlFile(java.io.File file_name, antlr.collections.AST a)
public JmlFile(JmlFileEntry file_name, antlr.collections.AST a, boolean external)
public JmlFile(java.lang.String fileName, java.util.Vector classes)
Method Detail |
public void storeData(java.lang.Object key, java.lang.Object data)
key
- the key to use for retrieving the datadata
- the data that has to be stored.public java.lang.Object getData(java.lang.Object key)
public void removeData(java.lang.Object key)
key
- the key corresponding to the information that should be
removed.public java.lang.String getFlatName()
JmlFile
.
The flat name is a name that can be used as a B machine name, and reduce the probability of name conflicts between different classes (such as classes with the same name in different packages).
It is currently equal to the name of the package this file belongs to, with dots replaced by underscores, and the name of the file without its extension. In case where the file belongs to the default package, the flat name correspond to the name of the file, without its extension.
public JmlFileEntry getFileName()
public java.lang.String getFileNameAbsolutePath()
public boolean isExternal()
public boolean isImportedClass(java.lang.String class_name)
public Package getImportedClassPackage(java.lang.String class_name)
public int parse(IJml2bConfiguration config)
public void link(IJml2bConfiguration config) throws Jml2bException
Jml2bException
public int linkStatements(IJml2bConfiguration config) throws Jml2bException
Jml2bException
public void typeCheck(IJml2bConfiguration config) throws Jml2bException
Jml2bException
public Package getPackage()
public java.util.Enumeration getClasses()
public java.util.Enumeration getImportedPackages()
public static boolean isJmlFile(java.lang.String s)
public static Package addPackages(antlr.collections.AST ast, Package pkg)
public int getNbPo()
public int getNbPoProved(java.lang.String prover)
public int getNbPoProved()
public static long getLoadedFilesCount()
public static long getJmlParserTime()
public static void resetStats()
public void mergeWith(JmlFile jf)
public java.util.Vector getDepends()
public void setDepends(java.util.Vector depends)
depends
- The depends to setpublic java.lang.String emit(IJml2bConfiguration config)
public java.lang.String[] getLangNames()
getLangNames
in interface IJmlFile
public IJml2bConfiguration getConfig()
public void purgeObvious()
public antlr.collections.AST getFileAST()
public void save(IJml2bConfiguration config, JpoOutputStream s) throws java.io.IOException
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |