@Target(value=METHOD) @Retention(value=RUNTIME) public @interface Output
public int sum(int i1, int i2);
can be proxied by a method defined as:
@Output
public OutputChannel<Integer> sum(int i1, int i2);
The interface can also return an array or list of outputs:
@Output(OutputMode.COLLECTION)
public List<Integer> sum(int i1, int i2);
Note that the transfer mode is specifically chosen through the annotation mode attribute
(it's CHANNEL by default).
Remember also that, in order for the annotation to properly work at run time, you will need to
add the following rules to your Proguard file (if employing it for shrinking or obfuscation):
-keepattributes RuntimeVisibleAnnotations
-keepclassmembers class ** {
@com.github.dm.jrt.annotation.Output *;
}
Created by davide-maestroni on 05/24/2015.| Modifier and Type | Optional Element and Description |
|---|---|
Output.OutputMode |
value
The output transfer mode.
|
public abstract Output.OutputMode value