1 // license-header java merge-point 2 // 3 // Attention: generated code (by Metafacade.vsl) - do not modify! 4 // 5 package org.andromda.metafacades.uml; 6 7 import java.util.Collection; 8 9 /** 10 * A behavioral feature of a classifier that specifies the name, type, parameters, and constraints 11 * for invoking an associated behavior. May invoke both the execution of method behaviors as well as 12 * other behavioral responses. 13 * 14 * Metafacade interface to be used by AndroMDA cartridges. 15 */ 16 public interface OperationFacade 17 extends ModelElementFacade 18 { 19 /** 20 * Indicates the metafacade type (used for metafacade mappings). 21 * 22 * @return boolean always <code>true</code> 23 */ 24 public boolean isOperationFacadeMetaType(); 25 26 /** 27 * Finds the parameter on this operation having the given name, if no parameter is found, null 28 * is returned instead. 29 * @param name String 30 * @return ParameterFacade 31 */ 32 public ParameterFacade findParameter(String name); 33 34 /** 35 * Searches the given feature for the specified tag. 36 * If the follow boolean is set to true then the search will continue from the class operation 37 * to the class itself and then up the class hierarchy. 38 * @param name String 39 * @param follow boolean 40 * @return Object 41 */ 42 public Object findTaggedValue(String name, boolean follow); 43 44 /** 45 * A comma separated list of all argument names. 46 * @return String 47 */ 48 public String getArgumentNames(); 49 50 /** 51 * A comma separated list of all types of each argument, in order. 52 * @return String 53 */ 54 public String getArgumentTypeNames(); 55 56 /** 57 * Specification of an argument used to pass information into or out of an invocation of a 58 * behavioral 59 * feature. Parameters are allowed to be treated as connectable elements. Parameters have 60 * support for 61 * streaming, exceptions, and parameter sets. 62 * @return Collection<ParameterFacade> 63 */ 64 public Collection<ParameterFacade> getArguments(); 65 66 /** 67 * Constructs the operation call with the operation name 68 * @return String 69 */ 70 public String getCall(); 71 72 /** 73 * Returns the concurrency modifier for this operation (i.e. concurrent, guarded or sequential) 74 * of the model element, will attempt a lookup for these values in the language mappings (if 75 * any). 76 * @return String 77 */ 78 public String getConcurrency(); 79 80 /** 81 * A comma separated list containing all exceptions that this operation throws. Exceptions are 82 * determined through dependencies that have the target element stereotyped as <<Exception>>. 83 * @return String 84 */ 85 public String getExceptionList(); 86 87 /** 88 * Returns a comma separated list of exceptions appended to the comma separated list of fully 89 * qualified 'initialException' classes passed in to this method. 90 * @param initialExceptions String 91 * @return String 92 */ 93 public String getExceptionList(String initialExceptions); 94 95 /** 96 * A collection of all exceptions thrown by this operation. 97 * @return Collection<ModelElementFacade> 98 */ 99 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 }