org.andromda.core.metafacade
Class MetafacadeImpls

java.lang.Object
  extended by org.andromda.core.metafacade.MetafacadeImpls
All Implemented Interfaces:
java.io.Serializable

public class MetafacadeImpls
extends java.lang.Object
implements java.io.Serializable

Discovers all metafacade interfaces and implementation classes in each namespace registry. This class is then used to retrieve both the appropriate metafacade interface and/or metafacade implementation class based on one or the other.

Author:
Chad Brandon
See Also:
Serialized Form

Constructor Summary
MetafacadeImpls()
           
 
Method Summary
 void discover(java.lang.String[] metafacadeModelNamespaces)
          Discovers and loads all metafacade implementation classes and interfaces in each avaiable namespace registry into each given namespace in the modelTypeNamespaces list.
 java.lang.Class getMetafacadeClass(java.lang.String metafacadeImplClass)
          Retrieves the metafacade class from the passed in metafacadeImplClass.
 java.lang.Class getMetafacadeImplClass(java.lang.String metafacadeClass)
          Retrieves the metafacade implementation class from the passed in metafacadeClass.
static MetafacadeImpls instance()
          Returns the shared instance of this class.
 void setMetafacadeModelNamespace(java.lang.String metafacadeModelNamespace)
          Sets the current model type to which this instance's metafacade class retrieval should apply.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetafacadeImpls

public MetafacadeImpls()
Method Detail

instance

public static MetafacadeImpls instance()
Returns the shared instance of this class.

Returns:
MetafacadeImpls the shared instance.

setMetafacadeModelNamespace

public void setMetafacadeModelNamespace(java.lang.String metafacadeModelNamespace)
Sets the current model type to which this instance's metafacade class retrieval should apply.

Parameters:
metafacadeModelNamespace - the namespace that has the metafacade model implementation.

discover

public void discover(java.lang.String[] metafacadeModelNamespaces)
Discovers and loads all metafacade implementation classes and interfaces in each avaiable namespace registry into each given namespace in the modelTypeNamespaces list. Note that this method must be called before any metafacade implementation classes will be able to be retrieved when calling getMetafacadeClass(String)or getMetafacadeImplClass(String).

Parameters:
metafacadeModelNamespaces - a list of each namespace containing a metafacade model facade implementation.

getMetafacadeClass

public java.lang.Class getMetafacadeClass(java.lang.String metafacadeImplClass)
Retrieves the metafacade class from the passed in metafacadeImplClass. Will return a MetafacadeImplsException if a metafacade class can not be found for the metafacadeImplClass

Parameters:
metafacadeImplClass - the name of the metafacade implementation class.
Returns:
the metafacacade Class

getMetafacadeImplClass

public java.lang.Class getMetafacadeImplClass(java.lang.String metafacadeClass)
Retrieves the metafacade implementation class from the passed in metafacadeClass. Will return a MetafacadeImplsException if a metafacade implementation class can not be found for the metafacadeClass

Parameters:
metafacadeClass - the name of the metafacade class.
Returns:
the metafacacade implementation Class


Copyright © 2003-2008 AndroMDA.org. All Rights Reserved.