Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'incoming/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry/src/org/eclipse/papyrus/infra/core/serviceregistry/annotations/ServiceFactory.java')
-rw-r--r--incoming/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry/src/org/eclipse/papyrus/infra/core/serviceregistry/annotations/ServiceFactory.java53
1 files changed, 53 insertions, 0 deletions
diff --git a/incoming/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry/src/org/eclipse/papyrus/infra/core/serviceregistry/annotations/ServiceFactory.java b/incoming/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry/src/org/eclipse/papyrus/infra/core/serviceregistry/annotations/ServiceFactory.java
new file mode 100644
index 00000000000..8439fac8897
--- /dev/null
+++ b/incoming/serviceregistry/org.eclipse.papyrus.infra.core.serviceregistry/src/org/eclipse/papyrus/infra/core/serviceregistry/annotations/ServiceFactory.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2012 Cedric Dumoulin.
+ *
+ *
+ * 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:
+ * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.core.serviceregistry.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.eclipse.papyrus.infra.core.serviceregistry.annotations.Service.StartupKind;
+
+
+
+/**
+ * @author cedric dumoulin
+ *
+ */
+//Annotation accessible at runtime
+@Retention(RetentionPolicy.RUNTIME)
+//Annotation associated to (Class, interface)
+@Target(ElementType.TYPE)
+public @interface ServiceFactory {
+
+ /*
+ * Service Id
+ */
+ String id() default Service.ID_NOT_SET;
+
+ /**
+ * Kind of startup requested for the service.
+ * @return
+ */
+ StartupKind startupKind() default StartupKind.lazy;
+
+ /**
+ * Service priority level. Default is 0.
+ * @return
+ */
+ int priority() default 0;
+
+}

Back to the top