Testing struct (single object); fixing small bugs, etc.
[iot2.git] / config / iotpolicy / testclasspolicy.pol
1 public interface TestClassInterface {
2
3         public byte getByte(byte in);
4         public short getShort(short in);
5         public long getLong(long in);
6         public float getFloat(float in);
7         public double getDouble(double in);
8         public boolean getBoolean(boolean in);
9         public char getChar(char in);
10
11         public byte[] getByteArray(byte in[]);
12         public short[] getShortArray(short in[]);
13         public long[] getLongArray(long in[]);
14         public float[] getFloatArray(float in[]);
15         public double[] getDoubleArray(double in[]);
16         public boolean[] getBooleanArray(boolean in[]);
17         public char[] getCharArray(char in[]);
18
19         public List<Byte> getByteList(List<Byte> in);
20         public List<Short> getShortList(List<Short> in);
21         public List<Long> getLongList(List<Long> in);
22         public List<Float> getFloatList(List<Float> in);
23         public List<Double> getDoubleList(List<Double> in);
24         public List<Boolean> getBooleanList(List<Boolean> in);
25         public List<Character> getCharList(List<Character> in);
26
27         public Enum handleEnum(Enum en);
28         public Enum[] handleEnumArray(Enum en[]);
29         public List<Enum> handleEnumList(List<Enum> en);
30
31         public Struct handleStruct(Struct str);
32
33         public int getA();
34         public void setA(int _int);
35         public void setB(float _float);
36         public void setC(String _string);
37         public String sumArray(String newA[]);
38         public int setAndGetA(int newA);
39         public int setACAndGetA(String newC, int newA);
40
41         capability Setters {
42                 description = "All the set methods";
43                 method = "getByte(byte in)";
44                 method = "getShort(short in)";
45                 method = "getLong(long in)";
46                 method = "getFloat(float in)";
47                 method = "getDouble(double in)";
48                 method = "getBoolean(boolean in)";
49                 method = "getChar(char in)";
50                 method = "getByteArray(byte in[])";
51                 method = "getShortArray(short in[])";
52                 method = "getLongArray(long in[])";
53                 method = "getFloatArray(float in[])";
54                 method = "getDoubleArray(double in[])";
55                 method = "getBooleanArray(boolean in[])";
56                 method = "getCharArray(char in[])";
57                 method = "getByteList(List<Byte> in)";
58                 method = "getShortList(List<Short> in)";
59                 method = "getLongList(List<Long> in)";
60                 method = "getFloatList(List<Float> in)";
61                 method = "getDoubleList(List<Double> in)";
62                 method = "getBooleanList(List<Boolean> in)";
63                 method = "getCharList(List<Character> in)";
64
65                 method = "handleEnum(Enum en)";
66                 method = "handleEnumArray(Enum en[])";
67                 method = "handleEnumList(List<Enum> en)";
68
69                 method = "handleStruct(Struct str)";
70
71                 method = "getA()";
72                 method = "setA(int _int)";
73                 method = "setB(float _float)";
74                 method = "setC(String _string)";
75         }
76
77         capability SetAndGets {
78                 description = "All the set-and-get methods";
79                 method = "sumArray(String newA[])";
80                 method = "setAndGetA(int newA)";
81                 method = "setACAndGetA(String newC, int newA)";
82         }
83
84         enum Enum {
85
86                 APPLE,
87                 ORANGE,
88                 GRAPE
89         }
90
91         struct Struct {
92
93                 string  name;
94                 float   value;
95                 int     year;
96         }
97 }
98
99