ant-dev mailing list archives

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

> -----Original Message-----
> From: Steve Loughran []
> ----- Original Message -----
> From: <>
> > 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.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message