aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2011-03-25 02:56:46 +0300
committerEvgeny Mandrikov <mandrikov@gmail.com>2011-04-04 22:46:21 +0400
commitd4bb3b72f9e188c93d0857d478a3ebc6f52365c1 (patch)
tree0109f7c074ad54661ff60d89bfab215ac3fa02a5 /sonar-plugin-api
parent628bb6718fc76baba8f452691cfc983a000e1397 (diff)
downloadsonarqube-d4bb3b72f9e188c93d0857d478a3ebc6f52365c1.tar.gz
sonarqube-d4bb3b72f9e188c93d0857d478a3ebc6f52365c1.zip
SONAR-1898 Introduce new entry point - SonarPlugin
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java1
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/SonarPlugin.java49
2 files changed, 50 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java b/sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java
index 70330026e16..092489ec08f 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java
@@ -29,6 +29,7 @@ import java.util.List;
*
* @see org.sonar.api.Extension
* @since 1.10
+ * @deprecated in 2.8. Use {@link SonarPlugin} instead.
*/
public interface Plugin {
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/SonarPlugin.java b/sonar-plugin-api/src/main/java/org/sonar/api/SonarPlugin.java
new file mode 100644
index 00000000000..bb2fbd90bc4
--- /dev/null
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/SonarPlugin.java
@@ -0,0 +1,49 @@
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
+ */
+package org.sonar.api;
+
+/**
+ * A plugin is a group of extensions. See {@link Extension} interface to get all extension points.
+ *
+ * @since 2.8
+ */
+public abstract class SonarPlugin implements Plugin {
+
+ public final String getKey() {
+ throw new UnsupportedOperationException();
+ }
+
+ public final String getName() {
+ throw new UnsupportedOperationException();
+ }
+
+ public final String getDescription() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Returns a string representation of the plugin, suitable for debugging purposes only.
+ */
+ @Override
+ public String toString() {
+ return getClass().getSimpleName();
+ }
+
+}