Testing and fixing bugs on enum data types
[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 int getA();
32         public void setA(int _int);
33         public void setB(float _float);
34         public void setC(String _string);
35         public String sumArray(String newA[]);
36         public int setAndGetA(int newA);
37         public int setACAndGetA(String newC, int newA);
38
39         capability Setters {
40                 description = "All the set methods";
41                 method = "getByte(byte in)";
42                 method = "getShort(short in)";
43                 method = "getLong(long in)";
44                 method = "getFloat(float in)";
45                 method = "getDouble(double in)";
46                 method = "getBoolean(boolean in)";
47                 method = "getChar(char in)";
48                 method = "getByteArray(byte in[])";
49                 method = "getShortArray(short in[])";
50                 method = "getLongArray(long in[])";
51                 method = "getFloatArray(float in[])";
52                 method = "getDoubleArray(double in[])";
53                 method = "getBooleanArray(boolean in[])";
54                 method = "getCharArray(char in[])";
55                 method = "getByteList(List<Byte> in)";
56                 method = "getShortList(List<Short> in)";
57                 method = "getLongList(List<Long> in)";
58                 method = "getFloatList(List<Float> in)";
59                 method = "getDoubleList(List<Double> in)";
60                 method = "getBooleanList(List<Boolean> in)";
61                 method = "getCharList(List<Character> in)";
62
63                 method = "handleEnum(Enum en)";
64                 method = "handleEnumArray(Enum en[])";
65                 method = "handleEnumList(List<Enum> en)";
66                 method = "getA()";
67                 method = "setA(int _int)";
68                 method = "setB(float _float)";
69                 method = "setC(String _string)";
70         }
71
72         capability SetAndGets {
73                 description = "All the set-and-get methods";
74                 method = "sumArray(String newA[])";
75                 method = "setAndGetA(int newA)";
76                 method = "setACAndGetA(String newC, int newA)";
77         }
78
79         enum Enum {
80
81                 APPLE,
82                 ORANGE,
83                 GRAPE
84         }
85
86         struct Struct {
87
88                 string  name;
89                 float   value;
90                 int     year;
91         }
92 }
93
94