1 package org.sonar.plugins.sample;
3 import org.sonar.api.Extension;
4 import org.sonar.api.Plugin;
6 import java.util.ArrayList;
10 * This class is the container for all others extensions
12 public class SamplePlugin implements Plugin {
14 // The key which uniquely identifies your plugin among all others Sonar plugins
16 public String getKey() {
20 public String getName() {
21 return "My first Sonar plugin";
24 // This description will be displayed in the Configuration > Settings web page
26 public String getDescription() {
27 return "You shouldn't expect too much from this plugin except displaying the Hello World message.";
30 // This is where you're going to declare all your Sonar extensions
32 public List<Class<? extends Extension>> getExtensions() {
33 List<Class<? extends Extension>> list = new ArrayList<Class<? extends Extension>>();
35 list.add(SampleMetrics.class);
36 list.add(SampleSensor.class);
42 public String toString() {