All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.andromda.metafacades.uml14.BindingFacadeLogic Maven / Gradle / Ivy

Go to download

The UML 1.4 metafacades. This is the set of UML 1.4 metafacades implementations. These implement the common UML metafacades.

The newest version!
// license-header java merge-point
//
// Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
//
package org.andromda.metafacades.uml14;

import java.util.Collection;
import java.util.List;
import org.andromda.core.metafacade.ModelValidationMessage;
import org.andromda.metafacades.uml.BindingFacade;
import org.andromda.metafacades.uml.TemplateArgumentFacade;
import org.apache.log4j.Logger;
import org.omg.uml.foundation.core.Binding;

/**
 * 

* A representation of the model object 'Template Binding'. * Represents a relationship between a templateable element and a * template. Specifies the substitutions of actual parameters for * the formal parameters of the template. *

* MetafacadeLogic for BindingFacade * * @see BindingFacade */ public abstract class BindingFacadeLogic extends DependencyFacadeLogicImpl implements BindingFacade { /** * The underlying UML object * @see Binding */ protected Binding metaObject; /** Create Metafacade implementation instance using the MetafacadeFactory from the context * @param metaObjectIn * @param context */ protected BindingFacadeLogic(Binding metaObjectIn, String context) { super(metaObjectIn, getContext(context)); this.metaObject = metaObjectIn; } /** * The logger instance. */ private static final Logger logger = Logger.getLogger(BindingFacadeLogic.class); /** * Gets the context for this metafacade logic instance. * @param context String. Set to BindingFacade if null * @return context String */ private static String getContext(String context) { if (context == null) { context = "org.andromda.metafacades.uml.BindingFacade"; } return context; } /** Reset context only for non-root metafacades * @param context */ @Override public void resetMetafacadeContext(String context) { if (!this.contextRoot) // reset context only for non-root metafacades { context = getContext(context); // to have same value as in original constructor call setMetafacadeContext (context); } } /** * @return boolean true always * @see BindingFacade */ public boolean isBindingFacadeMetaType() { return true; } // ------------- associations ------------------ /** * * @return (Collection)handleGetArguments() */ public final Collection getArguments() { Collection getArguments1r = null; // bindingFacade has no pre constraints Collection result = handleGetArguments(); List shieldedResult = this.shieldedElements(result); try { getArguments1r = (Collection)shieldedResult; } catch (ClassCastException ex) { // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn BindingFacadeLogic.logger.warn("incorrect metafacade cast for BindingFacadeLogic.getArguments Collection " + result + ": " + shieldedResult); } // bindingFacade has no post constraints return getArguments1r; } /** * UML Specific type is returned in Collection, transformed by shieldedElements to AndroMDA Metafacade type * @return Collection */ protected abstract Collection handleGetArguments(); /** * @param validationMessages Collection * @see DependencyFacadeLogicImpl#validateInvariants(Collection validationMessages) */ @Override public void validateInvariants(Collection validationMessages) { super.validateInvariants(validationMessages); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy