|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.nasa.arc.brahms.vm.api.convert.InstanceMappingSingleton
public class InstanceMappingSingleton
InstanceMappingSingleton is a singleton IInstanceMapping used to maintain a mapping between existing Brahms and Java objects used to ensure that during the conversion between Brahms and Java objects no new objects are created when a mapping already exists, in that case state information is updated in the mapped object. This singleton maintains the mapping for a single Brahms virtual machine while that virtual machine is running.
Method Summary | |
---|---|
void |
addMapping(java.lang.Object jobj,
IObject bobj)
Adds the specified mapping between the specified Java object and Brahms object. |
IObject |
getBrahmsMapping(java.lang.Object obj)
Returns the Brahms object mapped to the specified Java object. |
static InstanceMappingSingleton |
getInstance()
Returns the singleton InstanceMappingSingleton. |
java.lang.Object |
getJavaMapping(IObject obj)
Returns the Java object mapped to the specified Brahms object. |
void |
removeMapping(java.lang.Object jobj,
IObject bobj)
Removes the specified mapping between the specified Java object and Brahms object. |
void |
reset()
Resets the mapping, clearing out any mappings that were maintained by this instance mapping. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static final InstanceMappingSingleton getInstance()
public void addMapping(java.lang.Object jobj, IObject bobj)
addMapping
in interface IInstanceMapping
jobj
- the Java Object being mappedbobj
- the Brahms IObject being mappedpublic void removeMapping(java.lang.Object jobj, IObject bobj)
removeMapping
in interface IInstanceMapping
jobj
- the mapped Java Objectbobj
- the mapped Brahms IObjectpublic java.lang.Object getJavaMapping(IObject obj)
getJavaMapping
in interface IInstanceMapping
obj
- the Brahms IObject for which to return its Java counterpart
public IObject getBrahmsMapping(java.lang.Object obj)
getBrahmsMapping
in interface IInstanceMapping
obj
- the Java Object for which to return its Brahms counterpart
public void reset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |