|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.andromda.core.metafacade.MetafacadeCache
public final class MetafacadeCache
A global cache for metafacades. Used by the MetafacadeFactorywhen constructing or retrieving metafacade
instances. If the cache constains the metafacade it should not be constructed again.
| Method Summary | |
|---|---|
void |
add(java.lang.Object mappingObject,
MetafacadeBase metafacade)
Adds the metafacade to the cache according to first mappingObject, second the
metafacade, and finally by the current namespace. |
void |
clear()
Clears the cache of any metafacades |
MetafacadeBase |
get(java.lang.Object mappingObject,
java.lang.Class metafacadeClass)
Returns the metafacade from the metafacade cache. |
static MetafacadeCache |
newInstance()
Constructs a new instance of this class. |
void |
setNamespace(java.lang.String namespace)
Sets the namespace to which the cache currently applies. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static MetafacadeCache newInstance()
public final void setNamespace(java.lang.String namespace)
namespace - the current namespace.
public final MetafacadeBase get(java.lang.Object mappingObject,
java.lang.Class metafacadeClass)
mappingObject, next the metafacadeClass, and finally by the current namespace.
Metafacades must be cached in order to keep track of the state of its validation. If we keep creating a new one
each time, we can never tell whether or not a metafacade has been previously validated. Not to mention tremendous
performance gains.
mappingObject - the object to which the mapping appliesmetafacadeClass - the class of the metafacade.
public final void add(java.lang.Object mappingObject,
MetafacadeBase metafacade)
metafacade to the cache according to first mappingObject, second the
metafacade, and finally by the current namespace.
mappingObject - the mappingObject for which to cache the metafacade.metafacade - the metafacade to cache.public final void clear()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||