Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 75762 invoked from network); 6 Mar 2010 06:21:07 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Mar 2010 06:21:07 -0000 Received: (qmail 7285 invoked by uid 500); 6 Mar 2010 06:20:51 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 7060 invoked by uid 500); 6 Mar 2010 06:20:50 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 7052 invoked by uid 99); 6 Mar 2010 06:20:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Mar 2010 06:20:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Mar 2010 06:20:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 315B6234C4C9 for ; Sat, 6 Mar 2010 06:20:27 +0000 (UTC) Message-ID: <1182188691.114611267856427201.JavaMail.jira@brutus.apache.org> Date: Sat, 6 Mar 2010 06:20:27 +0000 (UTC) From: "Michael Wooten (JIRA)" To: issues@commons.apache.org Subject: [jira] Created: (LANG-601) Add Builder Interface / Update Builders to Implement It MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org Add Builder Interface / Update Builders to Implement It ------------------------------------------------------- Key: LANG-601 URL: https://issues.apache.org/jira/browse/LANG-601 Project: Commons Lang Issue Type: New Feature Components: lang.builder.* Affects Versions: 3.0 Environment: Java 1.5+ Reporter: Michael Wooten Priority: Minor Fix For: 3.0 I propose the addition of a Builder interface that can be used to identify a class as a builder of a concrete type of object. The interface would provide the following method: T build(); There are many examples of classes that define a build() method, including BasicThreadFactory.Builder. By implementing this interface, the classes would explicitly indicate the object type they are capable of building. Furthermore, the interface can provide documentation on the best approach to implementing builder classes. I additionally suggest that the existing builder classes (CompareToBuilder, EqualsBuilder, HashCodeBuilder, and ToStringBuilder) implement this interface. No other changes would need to be made, since the class's build() method would only need to return the result of the current "build" method for each of those classes. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.