You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by bu...@apache.org on 2002/09/15 16:29:34 UTC
DO NOT REPLY [Bug 12661] New: -
Intake, mapToObject, and using Interfaces
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12661>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12661
Intake, mapToObject, and using Interfaces
Summary: Intake, mapToObject, and using Interfaces
Product: Turbine
Version: 2.1b3
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Intake
AssignedTo: turbine-dev@jakarta.apache.org
ReportedBy: edkoffler@fedex.com
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>