com.mcdermottroe.exemplar
Interface Copyable<T>

Type Parameters:
T - The type of the implementing object. For example, if String implemented this interface it would do so as Copyable<String>.
All Known Implementing Classes:
Argument, ConsoleFormatter, CopyException, Enum, Exception, ExitCode, Generator, Generator, Generator, Generator, Generator, InputException, LanguageAPIPair, Lexer, LexerException, MessageException, Option, OutputException, ParameterEntityException, Parser, ParserException, PEDeclTable, PowerSet, Switch, Task, TaskLogHandler, Timer, XMLAggregateObject, XMLAlternative, XMLAttribute, XMLAttributeContentType, XMLAttributeDefaultType, XMLAttributeList, XMLContent, XMLDocumentType, XMLDocumentTypeException, XMLElement, XMLElementContentModel, XMLElementReference, XMLEntity, XMLExternalIdentifier, XMLJavaSourceGenerator, XMLMixedContent, XMLNamedObject, XMLNotation, XMLObject, XMLParserGenerator, XMLParserGeneratorException, XMLParserObjectGenerator, XMLParserObjectGeneratorTest.TrivialXMLParserObjectGenerator, XMLParserSourceGenerator, XMLParserSourceGeneratorTest.ExtendedDTDSourceGenerator, XMLParserSourceGeneratorTest.NoRBXMLParserSourceGenerator, XMLSequence

public interface Copyable<T>

This interface is designed to be a replacement for Cloneable and should rectify the problems that exist with it.

The following problems exist with Cloneable:

Since:
0.2

Method Summary
 T getCopy()
          Creates a deep copy of the current object and returns it.
 

Method Detail

getCopy

T getCopy()
          throws CopyException
Creates a deep copy of the current object and returns it.

Returns:
A deep copy of the current object.
Throws:
CopyException - if the copying encountered an exception.