Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/adl4eclipse/org.eclipse.papyrus.osgi.profile/src/org/eclipse/papyrus/osgi/profile/OSGIStereotypesUtils.java')
-rw-r--r--extraplugins/adl4eclipse/org.eclipse.papyrus.osgi.profile/src/org/eclipse/papyrus/osgi/profile/OSGIStereotypesUtils.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/extraplugins/adl4eclipse/org.eclipse.papyrus.osgi.profile/src/org/eclipse/papyrus/osgi/profile/OSGIStereotypesUtils.java b/extraplugins/adl4eclipse/org.eclipse.papyrus.osgi.profile/src/org/eclipse/papyrus/osgi/profile/OSGIStereotypesUtils.java
new file mode 100644
index 00000000000..c68ba88dc1e
--- /dev/null
+++ b/extraplugins/adl4eclipse/org.eclipse.papyrus.osgi.profile/src/org/eclipse/papyrus/osgi/profile/OSGIStereotypesUtils.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST 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 LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.osgi.profile;
+
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * Utility class for {@link OSGIStereotypes}
+ */
+public class OSGIStereotypesUtils {
+
+ /**
+ * Returns <code>true</code> if the specified element represents a bundle
+ * @param element the element to check
+ * @return <code>true</code> if the specified element represents a bundle
+ */
+ public static boolean isBundle(Element element) {
+ return element.getAppliedStereotype(OSGIStereotypes.BUNDLE) !=null;
+ }
+}

Back to the top