org.andromda.core.metafacade
Class MetafacadeUtils

java.lang.Object
  extended by org.andromda.core.metafacade.MetafacadeUtils

final class MetafacadeUtils
extends Object

Contains static utility methods for dealing with metafacade instances.

Author:
Chad Brandon, Bob Fields

Constructor Summary
MetafacadeUtils()
           
 
Method Summary
(package private) static MetafacadeBase constructMetafacade(Class metafacadeClass, Object mappingObject, String context)
          Constructs a new metafacade from the given metafacadeClass and mappingObject.
static Set<String> getInheritedMappingClassNames(MetafacadeMapping mapping)
          Retrieves the inherited mapping class names for the given mapping by traveling up the inheritance hierarchy to find the ones that have the mapping class name declared.
static boolean isMetafacadeModelPresent(String namespace)
          Indicates whether or not a metafacade model facade is present within the given namespace
(package private) static boolean propertiesValid(MetafacadeBase metafacade, MetafacadeMapping mapping)
          Indicates whether or not the mapping properties (present on the mapping, if any) are valid on the metafacade.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetafacadeUtils

MetafacadeUtils()
Method Detail

propertiesValid

static boolean propertiesValid(MetafacadeBase metafacade,
                               MetafacadeMapping mapping)
Indicates whether or not the mapping properties (present on the mapping, if any) are valid on the metafacade.

Parameters:
metafacade - the metafacade instance on which the properties will be validated.
mapping - the MetafacadeMapping instance that contains the properties.
Returns:
true/false

constructMetafacade

static MetafacadeBase constructMetafacade(Class metafacadeClass,
                                          Object mappingObject,
                                          String context)
                                   throws Exception
Constructs a new metafacade from the given metafacadeClass and mappingObject.

Parameters:
metafacadeClass - the metafacade class.
mappingObject - the object to which the metafacade is mapped.
context -
Returns:
the new metafacade.
Throws:
Exception - if any error occurs during metafacade creation

getInheritedMappingClassNames

public static Set<String> getInheritedMappingClassNames(MetafacadeMapping mapping)
Retrieves the inherited mapping class names for the given mapping by traveling up the inheritance hierarchy to find the ones that have the mapping class name declared.

Parameters:
mapping - the MetafacadeMapping instance for which we'll retrieve its mapping classes.
Returns:
the names of the mapping classes.

isMetafacadeModelPresent

public static boolean isMetafacadeModelPresent(String namespace)
Indicates whether or not a metafacade model facade is present within the given namespace

Parameters:
namespace - the namespace to check.
Returns:
true/false


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