1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package fr.gedeon.telnetservice.syntaxtreeexample3.beans;
24
25 import fr.gedeon.telnetservice.syntaxtree.annotations.BeanOperation;
26 import fr.gedeon.telnetservice.syntaxtree.annotations.BeanOperationParameter;
27
28 public class Example3BeanA
29 {
30 @BeanOperation(
31 path = {"example3", "beanA"},
32 name = "hello",
33 description = "the description of the operation"
34 )
35 public String helloOperation(
36 @BeanOperationParameter(
37 name="name",
38 description="the name to greet"
39 )String name
40 ) {
41 return "Hello, " + name + "!";
42 }
43
44 @BeanOperation(
45 path = {"example3", "beanA"},
46 name = "+",
47 description = "add 2 numbers"
48 )
49 public double add(@BeanOperationParameter(
50 name="n1",
51 description="first number"
52 )int num1,
53 @BeanOperationParameter(
54 name="n2",
55 description="second number"
56 )long num2) {
57 return num1 + num2;
58 }
59 }