/*
* Created on May 12, 2004
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package org.xdev.base.xssl.reflection;
import java.util.HashMap;
import java.lang.reflect.Constructor;
/**
* @author AYegorov
*
* Company: xDev Group.org
*
* URL: <a>http://activexml.dev.java.net</a>
*
* File name: VirtualObject.java
*
* <p>Is bound: true | false</p>
*
* <table>
* <tr>
* <td>Description:</td>
* <td>
* <!--Your description here-->
* </td>
* </tr>
* </table>
* <table>
* <tr>
* <td colspan="3">
* Properties
* </td>
* </tr>
* <tr>
* <td>Name</td>
* <td>Value</td>
* <td>Description</td>
* </tr>
* <tr>
* <td></td>
* <td></td>
* <td></td>
* </tr>
* </table>
*/
public class VirtualObject extends AbstractVirtual {
/**
* @param id
*/
public VirtualObject(String id) {
super(id);
// XXX Auto-generated constructor stub
}
/**
* @param id
* @param properties
*/
public VirtualObject(String id, HashMap properties) {
super(id, properties);
// XXX Auto-generated constructor stub
}
/* (non-Javadoc)
* @see org.xdev.base.xssl.reflection.AbstractVirtual#reflect(java.lang.Class, java.lang.Class[], java.lang.Object[])
*/
protected Object reflect(Class cls, Class[] parameterClasses, Object[] parameterObjects) throws Exception {
for (int i=0; i<parameterObjects.length; i++) {
this.logDebug("Objects passed to the constructor: " + parameterObjects[i]);
}
return ((Constructor)this.resolveSignature(cls, parameterClasses)).newInstance(parameterObjects);
}
/* (non-Javadoc)
* @see org.xdev.base.xssl.reflection.AbstractVirtual#returnSignedObject(java.lang.Class[])
*/
protected Object returnSignedObject(Class cls, Class[] variation) throws Exception {
return cls.getConstructor(variation);
}
}
|