1 |
|
package org.apache.tapestry.services.impl; |
2 |
|
|
3 |
|
import ognl.Node; |
4 |
|
import org.apache.hivemind.service.ClassFab; |
5 |
|
import org.apache.hivemind.service.MethodSignature; |
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
public class CompiledExpression { |
12 |
|
|
13 |
|
ClassFab _generatedClass; |
14 |
|
Node _expression; |
15 |
|
Object _root; |
16 |
|
MethodSignature _getterMethod; |
17 |
|
MethodSignature _setterMethod; |
18 |
|
|
19 |
|
public CompiledExpression(Node expression, Object root, |
20 |
|
MethodSignature getter, MethodSignature setter) |
21 |
17 |
{ |
22 |
17 |
_expression = expression; |
23 |
17 |
_root = root; |
24 |
17 |
_getterMethod = getter; |
25 |
17 |
_setterMethod = setter; |
26 |
17 |
} |
27 |
|
|
28 |
|
public ClassFab getGeneratedClass() |
29 |
|
{ |
30 |
243 |
return _generatedClass; |
31 |
|
} |
32 |
|
|
33 |
|
public void setGeneratedClass(ClassFab generatedClass) |
34 |
|
{ |
35 |
15 |
_generatedClass = generatedClass; |
36 |
15 |
} |
37 |
|
|
38 |
|
public Node getExpression() |
39 |
|
{ |
40 |
112 |
return _expression; |
41 |
|
} |
42 |
|
|
43 |
|
public void setExpression(Node expression) |
44 |
|
{ |
45 |
0 |
_expression = expression; |
46 |
0 |
} |
47 |
|
|
48 |
|
public Object getRoot() |
49 |
|
{ |
50 |
116 |
return _root; |
51 |
|
} |
52 |
|
|
53 |
|
public void setRoot(Object root) |
54 |
|
{ |
55 |
0 |
_root = root; |
56 |
0 |
} |
57 |
|
|
58 |
|
public MethodSignature getGetterMethod() |
59 |
|
{ |
60 |
15 |
return _getterMethod; |
61 |
|
} |
62 |
|
|
63 |
|
public void setGetterMethod(MethodSignature method) |
64 |
|
{ |
65 |
0 |
_getterMethod = method; |
66 |
0 |
} |
67 |
|
|
68 |
|
public MethodSignature getSettermethod() |
69 |
|
{ |
70 |
7 |
return _setterMethod; |
71 |
|
} |
72 |
|
|
73 |
|
public void setSetterMethod(MethodSignature method) |
74 |
|
{ |
75 |
0 |
_setterMethod = method; |
76 |
0 |
} |
77 |
|
|
78 |
|
public String toString() |
79 |
|
{ |
80 |
0 |
return "CompiledExpression[" + |
81 |
|
"_generatedClass=" + _generatedClass + |
82 |
|
'\n' + |
83 |
|
", _expression=" + _expression + |
84 |
|
'\n' + |
85 |
|
", _root=" + _root + |
86 |
|
'\n' + |
87 |
|
", _getterMethod=" + _getterMethod + |
88 |
|
'\n' + |
89 |
|
", _setterMethod=" + _setterMethod + |
90 |
|
'\n' + |
91 |
|
']'; |
92 |
|
} |
93 |
|
} |