1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package javax.faces.component.behavior;
20
21 import java.io.Serializable;
22
23 class _AttachedStateWrapper implements Serializable
24 {
25 private static final long serialVersionUID = 4948301780259917764L;
26 private Class<?> _class;
27 private Object _wrappedStateObject;
28
29
30
31
32
33
34 public _AttachedStateWrapper(Class<?> clazz, Object wrappedStateObject)
35 {
36 if (wrappedStateObject != null && !(wrappedStateObject instanceof Serializable))
37 {
38 throw new IllegalArgumentException("Attached state for Object of type " + clazz + " (Class "
39 + wrappedStateObject.getClass().getName() + ") is not serializable");
40 }
41 _class = clazz;
42 _wrappedStateObject = wrappedStateObject;
43 }
44
45 public Class<?> getClazz()
46 {
47 return _class;
48 }
49
50 public Object getWrappedStateObject()
51 {
52 return _wrappedStateObject;
53 }
54 }