org.argouml.model.uml
Class CopyHelper

java.lang.Object
  extended byorg.argouml.model.uml.CopyHelper

final class CopyHelper
extends Object

Utility class to facilitate copying model elements.

Since:
0.13.2

Field Summary
private  NSUMLModelImplementation nsmodel
          The model implementation.
 
Constructor Summary
(package private) CopyHelper(NSUMLModelImplementation implementation)
          Constructor to forbid creation of this object.
 
Method Summary
(package private)  Object copy(Object anelement, Object ans)
          Make a copy of element in the given namespace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nsmodel

private NSUMLModelImplementation nsmodel
The model implementation.

Constructor Detail

CopyHelper

CopyHelper(NSUMLModelImplementation implementation)
Constructor to forbid creation of this object.

Parameters:
implementation - To get other helpers and factories.
Method Detail

copy

Object copy(Object anelement,
            Object ans)
Make a copy of element in the given namespace.

This function is a dispatcher that calls the copyElement(Element,Namespace) function from XXXFactory.

This function may fail and return null for any of the following reasons:

  1. No copy function is known for element's type.
  2. The copy function fails or throws.

Parameters:
anelement - is the element to copy.
ans - the namespace
Returns:
a copy of element, or null.
Throws:
IllegalArgumentException - if element is null.


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook