ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Newton" <snew...@standard.com>
Subject RE: Implementing the Clonable interface in a task
Date Mon, 12 Aug 2002 18:03:25 GMT


> -----Original Message-----
> From: Steve Loughran [mailto:steve_l@iseran.com]
> ----- Original Message -----
> From: <jlcarpenter@household.com>
> > The simplest way to configure the CVS instance
> > used by the utility is to simply clone the CVS instance 
> within the client
> > class and pass it to the utility class's constructor or as 
> an argument to
> > any static method.
> 
> How about teasing the CVS configuration into a self contained 
> object? Or
> pass a non-cloned reference in?
> 

If you really do need a copy (not a reference) to the CVS instance,
consider implementing a "copy constructor", either a constructor
that takes an instance of its own class as a parameter, or a static
newInstance method, that creates a copy of the instance passed in
as a parameter.

Cloneable and clone() are tricky to get right.

s

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message