|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjml2b.util.Profiler
jml2b.structure.java.JmlLoader
class used to load classes.
Field Summary | |
static java.lang.String[] |
defaultClasses
|
static int |
fileSearchMisses
Number of times a file is searched and not found. |
static java.util.Stack |
unlinkedFiles
files that don't have linked statements |
Constructor Summary | |
JmlLoader()
|
Method Summary | |
static boolean |
checkDirectory(IJml2bConfiguration config,
java.lang.String dir_name)
Checks that the given directory exists within the search path. |
static boolean |
classExists(java.lang.String fqn,
java.lang.String[] path)
Return true iff the given class exists in the given search path. |
static void |
clearAll()
Remove any unlinked file from the unlinkedFiles stack. |
static void |
linkStatements(IJml2bConfiguration config)
Links statements for all the remaining files. |
static AClass |
loadClass(IJml2bConfiguration config,
Package p,
java.lang.String name)
Returns the class name from package p . |
static AClass |
loadClass(IJml2bConfiguration config,
java.lang.String fqn)
Load the given class, creating the package as needed. |
static void |
loadDefaultClasses(IJml2bConfiguration config)
Loads the default classes (ensures that they are loaded) |
static boolean |
loadSerializedImage(java.lang.String image_file)
Loads classes from the given serialized image. |
static JmlFileEntry |
searchCandidateFile(IJml2bConfiguration config,
Package p,
java.lang.String name)
Search a candidate file for the class name located in the package relative path pkg_path . |
Methods inherited from class jml2b.util.Profiler |
runGC |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int fileSearchMisses
public static java.util.Stack unlinkedFiles
public static final java.lang.String[] defaultClasses
Constructor Detail |
public JmlLoader()
Method Detail |
public static AClass loadClass(IJml2bConfiguration config, Package p, java.lang.String name) throws Jml2bException
p
.
Loads the class if it is necessary.
The class is loaded as an "external" class.
Returns null
if the class could not be found.
throws a ClassLoadException
if a candidate file was found,
but could not be parsed.
Jml2bException
public static JmlFileEntry searchCandidateFile(IJml2bConfiguration config, Package p, java.lang.String name)
pkg_path
.
public static boolean checkDirectory(IJml2bConfiguration config, java.lang.String dir_name)
public static void linkStatements(IJml2bConfiguration config) throws Jml2bException
Jml2bException
public static AClass loadClass(IJml2bConfiguration config, java.lang.String fqn) throws Jml2bException
config
- the configuration that should be used for loading
new classes.fqn
- the fully qualified name of the class.
Jml2bException
public static void loadDefaultClasses(IJml2bConfiguration config)
config
- the configuration that should be used for loading
classes.public static boolean classExists(java.lang.String fqn, java.lang.String[] path)
.java
or a jml recognised extension is found
in a subdirectory of the search path corresponding to the
package name of the class.
fqn
- the fully qualified name of the class
public static boolean loadSerializedImage(java.lang.String image_file)
public static void clearAll()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |