01: /*
02: * Created on May 12, 2004
03: *
04: * To change the template for this generated file go to
05: * Window>Preferences>Java>Code Generation>Code and Comments
06: */
07: package org.xdev.base.xssl.reflection;
08:
09: import java.util.HashMap;
10:
11: import java.lang.reflect.Constructor;
12:
13: /**
14: * @author AYegorov
15: *
16: * Company: xDev Group.org
17: *
18: * URL: <a>http://activexml.dev.java.net</a>
19: *
20: * File name: VirtualObject.java
21: *
22: * <p>Is bound: true | false</p>
23: *
24: * <table>
25: * <tr>
26: * <td>Description:</td>
27: * <td>
28: * <!--Your description here-->
29: * </td>
30: * </tr>
31: * </table>
32: * <table>
33: * <tr>
34: * <td colspan="3">
35: * Properties
36: * </td>
37: * </tr>
38: * <tr>
39: * <td>Name</td>
40: * <td>Value</td>
41: * <td>Description</td>
42: * </tr>
43: * <tr>
44: * <td></td>
45: * <td></td>
46: * <td></td>
47: * </tr>
48: * </table>
49: */
50: public class VirtualObject extends AbstractVirtual {
51:
52: /**
53: * @param id
54: */
55: public VirtualObject(String id) {
56: super (id);
57: // XXX Auto-generated constructor stub
58: }
59:
60: /**
61: * @param id
62: * @param properties
63: */
64: public VirtualObject(String id, HashMap properties) {
65: super (id, properties);
66: // XXX Auto-generated constructor stub
67: }
68:
69: /* (non-Javadoc)
70: * @see org.xdev.base.xssl.reflection.AbstractVirtual#reflect(java.lang.Class, java.lang.Class[], java.lang.Object[])
71: */
72: protected Object reflect(Class cls, Class[] parameterClasses,
73: Object[] parameterObjects) throws Exception {
74:
75: for (int i = 0; i < parameterObjects.length; i++) {
76:
77: this .logDebug("Objects passed to the constructor: "
78: + parameterObjects[i]);
79:
80: }
81:
82: return ((Constructor) this .resolveSignature(cls,
83: parameterClasses)).newInstance(parameterObjects);
84: }
85:
86: /* (non-Javadoc)
87: * @see org.xdev.base.xssl.reflection.AbstractVirtual#returnSignedObject(java.lang.Class[])
88: */
89: protected Object returnSignedObject(Class cls, Class[] variation)
90: throws Exception {
91: return cls.getConstructor(variation);
92: }
93:
94: }
|