Bruce Snyder wrote:

> R >I have a BMP EntityBean, which has fields that are references to other
> R >BMP EntityBeans, i.e. their interfaces are the type of the fields (not
> R >the implementation classes, which seems to be how Castor is mostly
> R >used). Since these references cannot be resolved by simply instantiating
> R >those interfaces (ya can't instantiate interfaces) I need Castor to
> R >delegate to my own code which knows how to transform the stringified
> R >references into real objects. This goes both for 1-1 and 1-many
> R >mappings. If I got that it would be really awesome.
>
> Now I see what you mean. That's pretty slick. Now *I* want to see
> this work!

Well, you kind of can instantiate interfaces through the java.lang.reflect.Proxy
facility.  You can instantiate a new object with an InvocationHandler and munge the
values through that class' invoke() method.  Therefore you could have an interface
that could delegate to the reference (which could be of a different interface or
class).

- Drew
--
Drew Davidson
Chief Scientist/Director, Research & Development
OGNL Research Labs
(520) 531-1966
(520) 370-5117 (cell)
(520) 531-1965 (fax)
[EMAIL PROTECTED]
http://www.paintyourselfsilly.com
http://www.ognl.org

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to