001// license-header java merge-point 002// 003// Attention: generated code (by Metafacade.vsl) - do not modify! 004// 005package org.andromda.metafacades.uml; 006 007import java.util.Collection; 008 009/** 010 * A behavioral feature of a classifier that specifies the name, type, parameters, and constraints 011 * for invoking an associated behavior. May invoke both the execution of method behaviors as well as 012 * other behavioral responses. 013 * 014 * Metafacade interface to be used by AndroMDA cartridges. 015 */ 016public interface OperationFacade 017 extends ModelElementFacade 018{ 019 /** 020 * Indicates the metafacade type (used for metafacade mappings). 021 * 022 * @return boolean always <code>true</code> 023 */ 024 public boolean isOperationFacadeMetaType(); 025 026 /** 027 * Finds the parameter on this operation having the given name, if no parameter is found, null 028 * is returned instead. 029 * @param name String 030 * @return ParameterFacade 031 */ 032 public ParameterFacade findParameter(String name); 033 034 /** 035 * Searches the given feature for the specified tag. 036 * If the follow boolean is set to true then the search will continue from the class operation 037 * to the class itself and then up the class hierarchy. 038 * @param name String 039 * @param follow boolean 040 * @return Object 041 */ 042 public Object findTaggedValue(String name, boolean follow); 043 044 /** 045 * A comma separated list of all argument names. 046 * @return String 047 */ 048 public String getArgumentNames(); 049 050 /** 051 * A comma separated list of all types of each argument, in order. 052 * @return String 053 */ 054 public String getArgumentTypeNames(); 055 056 /** 057 * Specification of an argument used to pass information into or out of an invocation of a 058 * behavioral 059 * feature. Parameters are allowed to be treated as connectable elements. Parameters have 060 * support for 061 * streaming, exceptions, and parameter sets. 062 * @return Collection<ParameterFacade> 063 */ 064 public Collection<ParameterFacade> getArguments(); 065 066 /** 067 * Constructs the operation call with the operation name 068 * @return String 069 */ 070 public String getCall(); 071 072 /** 073 * Returns the concurrency modifier for this operation (i.e. concurrent, guarded or sequential) 074 * of the model element, will attempt a lookup for these values in the language mappings (if 075 * any). 076 * @return String 077 */ 078 public String getConcurrency(); 079 080 /** 081 * A comma separated list containing all exceptions that this operation throws. Exceptions are 082 * determined through dependencies that have the target element stereotyped as <<Exception>>. 083 * @return String 084 */ 085 public String getExceptionList(); 086 087 /** 088 * Returns a comma separated list of exceptions appended to the comma separated list of fully 089 * qualified 'initialException' classes passed in to this method. 090 * @param initialExceptions String 091 * @return String 092 */ 093 public String getExceptionList(String initialExceptions); 094 095 /** 096 * A collection of all exceptions thrown by this operation. 097 * @return Collection<ModelElementFacade> 098 */ 099 public Collection<ModelElementFacade> getExceptions(); 100 101 /** 102 * Return Type with multiplicity taken into account. UML14 does not allow multiplicity *. 103 * @return String 104 */ 105 public String getGetterSetterReturnTypeName(); 106 107 /** 108 * the lower value for the multiplicity 109 * -only applicable for UML2 110 * @return int 111 */ 112 public int getLower(); 113 114 /** 115 * Returns the operation method body determined from UML sequence diagrams or other UML sources. 116 * @return String 117 */ 118 public String getMethodBody(); 119 120 /** 121 * The operation this operation overrides, null if this operation is not overriding. 122 * @return OperationFacade 123 */ 124 public OperationFacade getOverriddenOperation(); 125 126 /** 127 * Gets the owner of this operation 128 * @return ClassifierFacade 129 */ 130 public ClassifierFacade getOwner(); 131 132 /** 133 * Return all parameters for the operation, including the return parameter. 134 * @return Collection<ParameterFacade> 135 */ 136 public Collection<ParameterFacade> getParameters(); 137 138 /** 139 * The name of the operation that handles postcondition constraints. 140 * @return String 141 */ 142 public String getPostconditionName(); 143 144 /** 145 * The postcondition constraints belonging to this operation. 146 * @return Collection<ConstraintFacade> 147 */ 148 public Collection<ConstraintFacade> getPostconditions(); 149 150 /** 151 * The call to the precondition operation. 152 * @return String 153 */ 154 public String getPreconditionCall(); 155 156 /** 157 * The name of the operation that handles precondition constraints. 158 * @return String 159 */ 160 public String getPreconditionName(); 161 162 /** 163 * The signature of the precondition operation. 164 * @return String 165 */ 166 public String getPreconditionSignature(); 167 168 /** 169 * The precondition constraints belonging to this operation. 170 * @return Collection<ConstraintFacade> 171 */ 172 public Collection<ConstraintFacade> getPreconditions(); 173 174 /** 175 * (UML2 Only). Get the actual return parameter (which may have stereotypes etc). 176 * @return ParameterFacade 177 */ 178 public ParameterFacade getReturnParameter(); 179 180 /** 181 * The operation return type parameter. 182 * @return ClassifierFacade 183 */ 184 public ClassifierFacade getReturnType(); 185 186 /** 187 * Return the operation signature, including public/protested abstract returnType name plus 188 * argument type and name 189 * @return String 190 */ 191 public String getSignature(); 192 193 /** 194 * Returns the signature of the operation and optionally appends the argument names (if 195 * withArgumentNames is true), otherwise returns the signature with just the types alone in the 196 * signature. 197 * @param withArgumentNames boolean 198 * @return String 199 */ 200 public String getSignature(boolean withArgumentNames); 201 202 /** 203 * Returns the signature of the operation and optionally appends the given 'argumentModifier' to 204 * each argument. 205 * @param argumentModifier String 206 * @return String 207 */ 208 public String getSignature(String argumentModifier); 209 210 /** 211 * A comma-separated parameter list (type and name of each parameter) of an operation. 212 * @return String 213 */ 214 public String getTypedArgumentList(); 215 216 /** 217 * A comma-separated parameter list (type and name of each parameter) of an operation with an 218 * optional modifier (i.e final) before each parameter. 219 * @param modifier String 220 * @return String 221 */ 222 public String getTypedArgumentList(String modifier); 223 224 /** 225 * the upper value for the multiplicity (will be -1 for *) 226 * - only applicable for UML2 227 * @return int 228 */ 229 public int getUpper(); 230 231 /** 232 * True is the operation is abstract. 233 * @return boolean 234 */ 235 public boolean isAbstract(); 236 237 /** 238 * True if the operation has (i.e. throws any exceptions) false otherwise. 239 * @return boolean 240 */ 241 public boolean isExceptionsPresent(); 242 243 /** 244 * IsLeaf property in the operation. If true, operation is final, cannot be extended or 245 * implemented by a descendant. Default=false. 246 * @return boolean 247 */ 248 public boolean isLeaf(); 249 250 /** 251 * UML2 only. If the return type parameter multiplicity>1 OR the operation multiplicity>1. 252 * Default=false. 253 * @return boolean 254 */ 255 public boolean isMany(); 256 257 /** 258 * UML2 only: If isMany (Collection type returned), is the type unique within the collection. 259 * Unique+Ordered determines CollectionType implementation of return result. Default=false. 260 * @return boolean 261 */ 262 public boolean isOrdered(); 263 264 /** 265 * True if this operation overrides an operation defined in an ancestor class. An operation 266 * overrides when the names of the operations as well as the types of the arguments are equal. 267 * The return type may be different and is, as well as any exceptions, ignored. 268 * @return boolean 269 */ 270 public boolean isOverriding(); 271 272 /** 273 * Whether any postcondition constraints are present on this operation. 274 * @return boolean 275 */ 276 public boolean isPostconditionsPresent(); 277 278 /** 279 * Whether any precondition constraints are present on this operation. 280 * @return boolean 281 */ 282 public boolean isPreconditionsPresent(); 283 284 /** 285 * Indicates whether or not this operation is a query operation. 286 * @return boolean 287 */ 288 public boolean isQuery(); 289 290 /** 291 * True/false depending on whether or not the operation has a return type or not (i.e. a return 292 * type of something other than void). 293 * @return boolean 294 */ 295 public boolean isReturnTypePresent(); 296 297 /** 298 * True is the operation is static (only a single instance can be instantiated). 299 * @return boolean 300 */ 301 public boolean isStatic(); 302 303 /** 304 * UML2 only: for Collection return type, is the type unique within the collection. 305 * Unique+Ordered determines the returned CollectionType. Default=false. 306 * @return boolean 307 */ 308 public boolean isUnique(); 309}