public class InferenceManager extends Object
Inference objects accessed via their names and
head objects. However, only one Inference object is stored per
Inference class. For example, if the LBJava 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.| Constructor and Description |
|---|
InferenceManager() |
| Modifier and Type | Method and Description |
|---|---|
static Inference |
get(String n,
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 |
put(String name,
Inference i)
Adds the given
Inference object to the cache, indexed by an arbitrary name (NB:
Don't use unless you know what you're doing). |
static void |
remove(String n)
Removes the inference object with the given name.
|
public static void put(Inference i)
Inference object to the cache, indexed its fully qualified name.i - The inference object.public static void put(String name, Inference i)
Inference object to the cache, indexed by an arbitrary name (NB:
Don't use unless you know what you're doing).name - The (arbitrary) name of the inference object.i - The inference object.public static Inference get(String n, 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(String n)
n - The name of the unwanted inference.Copyright © 2016. All rights reserved.