Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 190E79F1C for ; Fri, 4 Nov 2011 11:20:03 +0000 (UTC) Received: (qmail 61147 invoked by uid 500); 4 Nov 2011 11:20:02 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 61059 invoked by uid 500); 4 Nov 2011 11:20:02 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 61051 invoked by uid 99); 4 Nov 2011 11:20:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Nov 2011 11:20:02 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [173.236.76.174] (HELO serv01.siteground309.com) (173.236.76.174) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Nov 2011 11:19:55 +0000 Received: from [86.184.131.207] (port=1287 helo=[192.168.1.64]) by serv01.siteground309.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1RMHo7-0002dp-4P for dev@commons.apache.org; Fri, 04 Nov 2011 06:19:35 -0500 Message-ID: <4EB3CA75.6060801@sandglass-software.com> Date: Fri, 04 Nov 2011 11:20:21 +0000 From: Adrian Crum Organization: Sandglass Software User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Commons Developers List Subject: Re: [convert] API Discussion... References: <4EB3C4AA.4050009@sandglass-software.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - serv01.siteground309.com X-AntiAbuse: Original Domain - commons.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - sandglass-software.com X-Virus-Checked: Checked by ClamAV on apache.org From my perspective, it would be preferable to keep the community involved in the design decisions. -Adrian On 11/4/2011 11:15 AM, James Carman wrote: > I don't have to submit a patch. I am a commons committer > On Nov 4, 2011 5:55 AM, "Adrian Crum" > wrote: > >> The source and target classes are used by the Converter.canConvert method. >> The Converter.canConvert method is used by the Converter factory to find >> the correct converter. The reason parameterized types are not used in this >> scenario is so you can create converters that handle entire class >> hierarchies. If you can think of a way to replace the Class references with >> parameters, that would be great. Submit a patch and I will look it over. >> >> You could submit a patch for your partially-completed ConverterChain class >> and maybe someone else will complete it. >> >> -Adrian >> >> >> On 11/4/2011 2:19 AM, James Carman wrote: >> >>> I was taking a look at the [convert] component because I have done >>> some work lately on some handy conversion classes. I'm struggling to >>> understand why you'd need the getSourceClass() and getTargetClass() >>> methods if you're using generics. >>> >>> >>> Also, I've got a class that looks like this: >>> >>> public class ConverterChain implements Converter >>> { >>> public static ConverterChain from(Class sourceType); >>> public ConverterChain append(Converter converter); >>> ... >>> } >>> >>> I'd like to contribute it, but in my library, I don't have all of >>> those references to the class objects (source/target). I might check >>> it in without the source/target stuff implemented. >>> >>> ------------------------------**------------------------------**--------- >>> To unsubscribe, e-mail: dev-unsubscribe@commons.**apache.org >>> For additional commands, e-mail: dev-help@commons.apache.org >>> >>> >> ------------------------------**------------------------------**--------- >> To unsubscribe, e-mail: dev-unsubscribe@commons.**apache.org >> For additional commands, e-mail: dev-help@commons.apache.org >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org