commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bjorn Townsend (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LANG-354) Implementation of a CloneBuilder Class
Date Tue, 13 Nov 2007 03:22:50 GMT

    [ https://issues.apache.org/jira/browse/LANG-354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542039
] 

Bjorn Townsend commented on LANG-354:
-------------------------------------

I agree with Ben.  It's a cool concept, but there are some fatal limitations that limit its
usefulness.  Don't think we can document said limitations concisely enough to make the method
useable.

> Implementation of a CloneBuilder Class
> --------------------------------------
>
>                 Key: LANG-354
>                 URL: https://issues.apache.org/jira/browse/LANG-354
>             Project: Commons Lang
>          Issue Type: New Feature
>            Reporter: Dave Meikle
>            Priority: Minor
>             Fix For: 2.4
>
>         Attachments: CloneBuilder.java, CloneBuilderTest.java
>
>
> As discussed on the Mailing List an implementation of a CloneBuilder class to simplify
creating basic clone methods like the other builders in Lang. Example usage would be as follows:
>  public Object clone() {
>      return CloneBuilder.reflectionClone(this);
>  }
> or
>  public Object clone() {
>      return new CloneBuilder(this)
>          .append("field1")         // note the 'field by name' usage
>          .append("field2")         // rather than 'field by value'
>          ...
>          .append("fieldn")
>          .toClone();
>  }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message