You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Evan Koffler <ev...@codezodiac.com> on 2002/10/19 18:51:51 UTC

[SOURCE] Issue #FULS4 - Intake, mapToObject, and using Interfaces

You can view the issue detail at the following URL:
<http://nagoya.apache.org/scarab/issues/id/FULS4>

Type :        Patch
Issue Id :    FULS4
Reported by: Evan Koffler
             ekoffler - (evan@codezodiac.com)

Details:

Platform: PC
Operating system: Redhat
Summary: Intake, mapToObject, and using Interfaces
Description: This is/was bugzilla bug #12661. Moving it to Scarab.

Short version: Intake won't use interfaces for the mapTo 
Attached is a patch that provides this.

Details:

I've been using Intake quite successfully until a recent change I
 made in my code. The mapTo object is a configuration object that
 does the PropertyChange and VetoableChange JavaBean pattern and it
 got rather tedious. So I switched to using an dynamic Proxy
(java.lang.reflect.Proxy). Testing with regular Java classes it works
great.

Following the code, Intake.mapTo(Retrievable) uses the Retrievable's
classname (and superclasses) as the key into a Map for fields (and
ultimately their setter/getters. The dynamic Proxy is initialized by
providing an interface. Sun's implementation in the JDK auto-creates
a new class that implements the interface as well as extending Object
while naming the class Proxy0 (as in zero, not oh). Therefore, the
proxied object ends up with a name not known to Intake yet
implementing an interface. So Group.init(Retrievable)'s logic of
chasing the classes and superclasses won't find any fields for the
class.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>