|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.system.ObjectCopy
public class ObjectCopy
CoClass to copy objects by value.
Provides a mechanism to duplicate an object using an objects persistence mechanism (IPersistStream). The objects state is written to a temporary stream and then "rehydrated" from that stream into a new instance of the object. This process is also known as a 'deep clone' as an object will also duplicate all sub objects that it contains. Even if the object supports IClone, you may still want to use ObjectCopy since it does a full copy or 'deep clone' of the object.
ObjectCopy is useful for copying objects such as symbols or elements, particularly in cut-and-paste operations. Be careful, however, when using it on high-level objects such as Map. Objects which have a complicated state may not be fully reinitialized by their IPersistStream implementation, so ObjectCopy may not result in an object that is fully ready to participate with other objects. This is particularly true when using IObjectCopy::Overwrite to replace an object.
Constructor Summary | |
---|---|
ObjectCopy()
Constructs a ObjectCopy using ArcGIS Engine. |
|
ObjectCopy(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. ObjectCopy theObjectCopy = (ObjectCopy) obj; |
Method Summary | |
---|---|
Object |
copy(Object pInObject)
Obtains a new object which is a copy of the input object. |
boolean |
equals(Object o)
Compare this object with another |
static String |
getClsid()
getClsid. |
int |
hashCode()
the hashcode for this object |
void |
overwrite(Object pInObject,
Object[] pOverwriteObject)
Overwrites the object with the contents of input object. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public ObjectCopy() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic ObjectCopy(Object obj) throws IOException
ObjectCopy theObjectCopy = (ObjectCopy) obj;
obj
to ObjectCopy
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public Object copy(Object pInObject) throws IOException, AutomationException
Used to copy an object by value. The object must support IPersistStream. Even if the object supports IClone you may still want to use Copy as it does a full copy or 'deep clone' of the object.
Copy may fail if there is insufficient memory.
copy
in interface IObjectCopy
pInObject
- A reference to another Object (IUnknown) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void overwrite(Object pInObject, Object[] pOverwriteObject) throws IOException, AutomationException
Used to overwrite an existing object with the contents of another object. The objects must be the same type of object and support IPersistStream.
Overwrite may fail if there is insufficient memory.
overwrite
in interface IObjectCopy
pInObject
- A reference to another Object (IUnknown) (in)pOverwriteObject
- A reference to another Object (IUnknown) (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |