1 package net.sf.crispy.impl.caucho;
2
3 import net.sf.crispy.InterceptorContext;
4 import net.sf.crispy.InvocationException;
5 import net.sf.crispy.Modifier;
6 import net.sf.crispy.util.Converter;
7
8 public class ConverterModifier implements Modifier {
9
10
11 public InterceptorContext modifyBeforeInvocation(InterceptorContext pvInterceptorContext) {
12
13
14
15
16
17
18
19
20
21
22 return pvInterceptorContext;
23 }
24
25 public InterceptorContext modifyAfterInvocation(InterceptorContext pvInterceptorContext) {
26 Object lvResult = pvInterceptorContext.getResult();
27 try {
28 lvResult = new Converter().makeComplex(lvResult);
29 } catch (Exception e) {
30 throw new InvocationException("Exception in ConverterModifier in modifyAfterInvocation: " + e, e);
31 }
32 pvInterceptorContext.setResult(lvResult);
33 return pvInterceptorContext;
34 }
35
36 }