1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.jexl3;
18
19 import java.util.ArrayList;
20 import java.util.Iterator;
21 import java.util.List;
22
23
24
25
26
27
28 public class Foo {
29
30 public class Cheezy {
31 public Iterator<String> iterator() {
32 return getCheeseList().iterator();
33 }
34 }
35 private boolean beenModified;
36 private String property1 = "some value";
37 public Foo() {}
38
39 public String bar()
40 {
41 return JexlTest.METHOD_STRING;
42 }
43
44 public String convertBoolean(final boolean b)
45 {
46 return "Boolean : " + b;
47 }
48
49 public String[] getArray()
50 {
51 return ArrayAccessTest.GET_METHOD_ARRAY;
52 }
53
54 public String[][] getArray2()
55 {
56 return ArrayAccessTest.GET_METHOD_ARRAY2;
57 }
58
59 public String getBar()
60 {
61 return JexlTest.GET_METHOD_STRING;
62 }
63
64 public List<String> getCheeseList()
65 {
66 final ArrayList<String> answer = new ArrayList<>();
67 answer.add("cheddar");
68 answer.add("edam");
69 answer.add("brie");
70 return answer;
71 }
72
73 public Cheezy getCheezy()
74 {
75 return new Cheezy();
76 }
77
78 public int getCount() {
79 return 5;
80 }
81
82 public Foo getInnerFoo()
83 {
84 return new Foo();
85 }
86
87 public boolean getModified()
88 {
89 return beenModified;
90 }
91
92 public String getProperty1() {
93 return property1;
94 }
95
96 public String getQuux() {
97 return "String : quux";
98 }
99
100 public int getSize()
101 {
102 return 22;
103 }
104
105 public boolean getTrueAndModify()
106 {
107 beenModified = true;
108 return true;
109 }
110
111 public boolean isSimple()
112 {
113 return true;
114 }
115
116 public String repeat(final String str) {
117 return "Repeat : " + str;
118 }
119
120 public void setProperty1(final String newValue) {
121 property1 = newValue;
122 }
123
124 public int square(final int value)
125 {
126 return value * value;
127 }
128 }