001// license-header java merge-point 002// 003// Attention: generated code (by MetafacadeLogic.vsl) - do not modify! 004// 005package org.andromda.metafacades.uml14; 006 007import java.util.Collection; 008import org.andromda.core.metafacade.ModelValidationMessage; 009import org.andromda.metafacades.uml.Destination; 010import org.omg.uml.foundation.core.Node; 011 012/** 013 * Represents a UML Destination for incoming/outgoing messages. 014 * MetafacadeLogic for Destination 015 * 016 * @see Destination 017 */ 018public abstract class DestinationLogic 019 extends NodeFacadeLogicImpl 020 implements Destination 021{ 022 /** 023 * The underlying UML object 024 * @see Object 025 */ 026 protected Object metaObject; 027 028 /** Create Metafacade implementation instance using the MetafacadeFactory from the context 029 * @param metaObjectIn 030 * @param context 031 */ 032 protected DestinationLogic(Object metaObjectIn, String context) 033 { 034 super((Node)metaObjectIn, getContext(context)); 035 this.metaObject = metaObjectIn; 036 } 037 038 /** 039 * Gets the context for this metafacade logic instance. 040 * @param context String. Set to Destination if null 041 * @return context String 042 */ 043 private static String getContext(String context) 044 { 045 if (context == null) 046 { 047 context = "org.andromda.metafacades.uml.Destination"; 048 } 049 return context; 050 } 051 052 /** Reset context only for non-root metafacades 053 * @param context 054 */ 055 @Override 056 public void resetMetafacadeContext(String context) 057 { 058 if (!this.contextRoot) // reset context only for non-root metafacades 059 { 060 context = getContext(context); // to have same value as in original constructor call 061 setMetafacadeContext (context); 062 } 063 } 064 065 /** 066 * @return boolean true always 067 * @see Destination 068 */ 069 public boolean isDestinationMetaType() 070 { 071 return true; 072 } 073 074 // ------------- associations ------------------ 075 076 /** 077 * @param validationMessages Collection<ModelValidationMessage> 078 * @see NodeFacadeLogicImpl#validateInvariants(Collection validationMessages) 079 */ 080 @Override 081 public void validateInvariants(Collection<ModelValidationMessage> validationMessages) 082 { 083 super.validateInvariants(validationMessages); 084 } 085}