Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright (c) 2011 CEA and others.
   * All rights reserved.   This program and the accompanying materials
   * are made available under the terms of the Eclipse Public License v1.0
   * which accompanies this distribution, and is available at
   * http://www.eclipse.org/legal/epl-v10.html
   *
   * Contributors:
   *   CEA - initial API and implementation
  *   Kenn Hussey (CEA) - 351774
  *
  */
 package org.eclipse.uml2.uml.profile.l2.internal.operations;
 
 import java.util.Map;
 
 
 
A static utility class that provides operations related to 'Create' model objects.

The following operations are supported:

  • Validate Client And Supplier Are Classifiers

Generated:
not
 
 public class CreateOperations
 		extends UMLUtil {

Generated:
 
 	protected CreateOperations() {
 		super();
 	}

self.base_Usage->notEmpty() implies (self.base_Usage.client->forAll(oclIsKindOf(Classifier)) and self.base_Usage.supplier->forAll(oclIsKindOf(Classifier)))

Parameters:
create The receiving 'Create' model object.
diagnostics The chain of diagnostics to which problems are to be appended.
context The cache of context-specific information.
Generated:
NOT
 
 	public static boolean validateClientAndSupplierAreClassifiers(
 			Create createDiagnosticChain diagnostics,
 			Map<ObjectObjectcontext) {
 		boolean result = true;
 
 		Usage base_Usage = create.getBase_Usage();
 
 		if (base_Usage != null) {
 
 			for (NamedElement client : base_Usage.getClients()) {
 
 				if (!(client instanceof Classifier)) {
 					result = false;
 					break;
 				}
 			}
 
 			if (result) {
 
 				for (NamedElement supplier : base_Usage.getSuppliers()) {
 
 					if (!(supplier instanceof Classifier)) {
 						result = false;
 						break;
 					}
 				}
 			}
 
 			if (!result && diagnostics != null) {
 				diagnostics
								"_UI_Create_ClientAndSupplierAreClassifiers_diagnostic"//$NON-NLS-1$
								getMessageSubstitutions(contextbase_Usage)),
						new Object[]{base_Usage}));
			}
		}
		return result;
	}
// CreateOperations
New to GrepCode? Check out our FAQ X