12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #set( $symbol_pound = '#' )
- #set( $symbol_dollar = '$' )
- #set( $symbol_escape = '\' )
- package ${package};
-
- import org.sonar.api.Plugin;
-
- import java.util.Arrays;
- import java.util.List;
-
- /**
- * This class is the entry point for all extensions
- */
- public class SamplePlugin implements Plugin {
-
- /**
- * @deprecated this is not used anymore
- */
- public String getKey() {
- return "sample";
- }
-
- /**
- * @deprecated this is not used anymore
- */
- public String getName() {
- return "My Sonar plugin";
- }
-
- /**
- * @deprecated this is not used anymore
- */
- public String getDescription() {
- return "You shouldn't expect too much from this plugin except displaying the Hello World message.";
- }
-
- // This is where you're going to declare all your Sonar extensions
- public List getExtensions() {
- return Arrays.asList(SampleMetrics.class, SampleSensor.class, SampleDashboardWidget.class);
- }
-
- @Override
- public String toString() {
- return getClass().getSimpleName();
- }
- }
|