| java.lang.Object org.andromda.core.metafacade.MetafacadeCache
MetafacadeCache | final public class MetafacadeCache (Code) | | A global cache for metafacades. Used by the
MetafacadeFactory when constructing or retrieving metafacade
instances. If the cache constains the metafacade it should not be constructed again.
author: Chad Brandon |
Method Summary | |
final public void | add(Object mappingObject, MetafacadeBase metafacade) Adds the metafacade to the cache according to first mappingObject , second the
metafacade , and finally by the current namespace . | final public void | clear() | final public MetafacadeBase | get(Object mappingObject, Class metafacadeClass)
Returns the metafacade from the metafacade cache. | public static MetafacadeCache | newInstance() Constructs a new instance of this class. | final public void | setNamespace(String namespace) Sets the namespace to which the cache currently applies. | public String | toString() |
add | final public void add(Object mappingObject, MetafacadeBase metafacade)(Code) | | Adds the metafacade to the cache according to first mappingObject , second the
metafacade , and finally by the current namespace .
Parameters: mappingObject - the mappingObject for which to cache the metafacade. Parameters: metafacade - the metafacade to cache. |
clear | final public void clear()(Code) | | Clears the cache of any metafacades
|
get | final public MetafacadeBase get(Object mappingObject, Class metafacadeClass)(Code) | |
Returns the metafacade from the metafacade cache. The Metafacades are cached first by according to its
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.
Parameters: mappingObject - the object to which the mapping applies Parameters: metafacadeClass - the class of the metafacade. MetafacadeBase stored in the cache. |
newInstance | public static MetafacadeCache newInstance()(Code) | | Constructs a new instance of this class.
the new instance |
setNamespace | final public void setNamespace(String namespace)(Code) | | Sets the namespace to which the cache currently applies.
Parameters: namespace - the current namespace. |
|
|