Annotation Interface Signal


@Retention(RUNTIME) @Target(TYPE) public @interface Signal
Register the annotated type as a GObject signal on the enclosing class.

The signal declaration must be a functional interface. Example usage:


 
 public class Example extends GObject {
     @Signal
     public interface ExampleSignal {
         public boolean run();
     }
 }
 
Alternatively, extend an existing functional interface:

 
 public class Example extends GObject {
     @Signal
     public interface ExampleSignal extends BooleanSupplier {};
 }
 
When the enclosing class is registered as a GObject using Types#register(), the signal will be registered for that class, using the parameters of the annotated type.

The default name of the signal is derived from the type name, translating camel-case ("ExampleSignal") to kebab-case ("example-signal"). It is possible to override this with the name() parameter.