[jboss-jira] [JBoss JIRA] Created: (JASSIST-31) ProxyFactory should provide method to create "empty" proxy

Martin Burger (JIRA) jira-events at jboss.com
Thu Dec 14 08:48:48 EST 2006


ProxyFactory should provide method to create "empty" proxy
----------------------------------------------------------

                 Key: JASSIST-31
                 URL: http://jira.jboss.com/jira/browse/JASSIST-31
             Project: Javassist
          Issue Type: Feature Request
            Reporter: Martin Burger
         Assigned To: Shigeru Chiba
            Priority: Optional


All the create(...) methods of class ProxyFactory call a "real" constructor of the proxy class. Sometimes you need an "empty" proxy - an instance that was created by calling "no" constructor.

You can obtain "empty" instances by using sun.reflect.ReflectionFactory:

Constructor constructor = ReflectionFactory.getReflectionFactory().newConstructorForSerialization(proxyFactory.createClass(), Object.class.getDeclaredConstructor(new Class[0]));
Object emptyProxy = constructor.newInstance(new Object[0]);

So, a convenience method ProxyFactory.create() that calls the code above would be nice.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list