abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Garrett Rooney" <roo...@electricjellyfish.net>
Subject Base.clone() vs Object.clone()
Date Wed, 21 Jun 2006 16:30:57 GMT
Is there a reason that Abdera's Base interface defines clone as
returning something other than Object?

public interface Base extends Cloneable {

  /**
   * Serializes the model component out to the specified stream
   */
  void writeTo(OutputStream out) throws IOException;

  /**
   * Serializes the model component out to the specified writer
   */
  void writeTo(Writer writer) throws IOException;

  <T extends Base>T clone();

  Factory getFactory();

}

This seems to be contrary to the way I've always seen clone defined,
and it certainly throws IDEA for a loop, resulting in complaints about
errors in every single class in the model package due to that clash
between Base.clone and Object.clone.

-garrett

Mime
View raw message