Annotation Type Extension


  • @Target(TYPE)
    @Retention(RUNTIME)
    @IndexAnnotated
    public @interface Extension
    Annotation for specifying it as a Siddhi Extension.
    
     eg:-
          @Extension(
                          name = "customExtensionName",
                          namespace = "customExtensionNamespace",
                          description = "Description of the custom extension.",
                          parameters = {
                              @Parameter(name = "firstParameterName", type = {DataType.INT, DataType.LONG}),
                              @Parameter(name = "SecondParameterName", type = {DataType.STRING})
                          },
                          parameterOverloads = {
                               @ParameterOverload(parameterNames={"firstParameterName","secondParameterName"}),
                               @ParameterOverload(parameterNames={"firstParameterName"})
                           },
                          returnAttributes = @ReturnAttribute(type = {DataType.INT, DataType.LONG}),
                          examples = {@Example({"Example of the CustomExtension usage 1"}),
                                      @Example({"Example of the CustomExtension usage 2"})}
          )
          public CustomExtension extends ExtensionSuperClass {
              ...
          }
     
    • Element Detail

      • name

        String name
        Default:
        ""
      • namespace

        String namespace
        Default:
        ""
      • description

        String description
        Default:
        ""
      • deprecated

        boolean deprecated
        Default:
        false
      • deprecationNotice

        String deprecationNotice
        Default:
        ""
      • examples

        Example[] examples
        Default:
        {}