|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectLBJ2.infer.InferenceManager
public class InferenceManager
The inference manager is a cache of Inference objects
accessed via their names and head objects. However, only one
Inference object is stored per Inference class.
For example, if the LBJ source file contains the following two
inferences:
then thisinference Foo head MyClass { ... }
inference Bar head MyClass { ... }
InferenceManager will store a maximum of one
Foo object and one Bar object.
| Field Summary | |
|---|---|
private static java.util.LinkedHashMap |
cache
The cache of Inference objects, indexed by
Keys. |
| Constructor Summary | |
|---|---|
InferenceManager()
|
|
| Method Summary | |
|---|---|
static Inference |
get(java.lang.String n,
java.lang.Object h)
Retrieves the Inference object whose fully qualified name
and head object are specified. |
static void |
put(Inference i)
Adds the given Inference object to the cache, indexed its
fully qualified name. |
static void |
remove(java.lang.String n)
Removes the inference object with the given name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.util.LinkedHashMap cache
Inference objects, indexed by
Keys.
| Constructor Detail |
|---|
public InferenceManager()
| Method Detail |
|---|
public static void put(Inference i)
Inference object to the cache, indexed its
fully qualified name.
i - The inference object.
public static Inference get(java.lang.String n,
java.lang.Object h)
Inference object whose fully qualified name
and head object are specified.
n - The fully qualified name of the inference.h - The head object of the inference.
Inference object corresponding to the given
parameters, or null if no Inference
is associated with them.public static void remove(java.lang.String n)
n - The name of the unwanted inference.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||