org.argouml.model.uml
Class CopyHelper
java.lang.Object
org.argouml.model.uml.CopyHelper
- final class CopyHelper
- extends Object
Utility class to facilitate copying model elements.
- Since:
- 0.13.2
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 |
nsmodel
private NSUMLModelImplementation nsmodel
- The model implementation.
CopyHelper
CopyHelper(NSUMLModelImplementation implementation)
- Constructor to forbid creation of this object.
- Parameters:
implementation
- To get other helpers and factories.
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:
- No copy function is known for element's type.
- 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.