Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dsdp-tm-dev] IHostFilePermissions#clone()

Hi Dave,

your new IHostFilePermissions#clone() method looks
odd to me, can you explain it?

Why don't you just require IHostFilePermissions 
implementers to also implement Cloneable and
provide a public Object clone() method? See the
Java API docs for the Cloneable interface.

If you really don't like the Cloneable approach,
you'd better call your method differently 
(e.g. duplicate()) and avoid the extra parameter.
Only like that you can ensure that if you have
two different implementations of IHostFilePermissions,
the method will create a proper duplicate.

Cheers,
--
Martin Oberhuber, Senior Member of Technical Staff, Wind River
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm
 


Back to the top