storeCopy()

The javaLib.storeCopy() system function creates a new identifier based on another in the object space, so that both refer to the same object. If the source identifier is not in the object space, a null is stored for the target identifier and no error occurs. If the target identifier is already in the object space, the action is equivalent to the following steps:

For more about the EGL Java™ object space in which javaLib.storeCopy() and similar functions operate, see Java access functions. EGL maintains this method of Java access for compatibility with earlier versions. For new code, use the more powerful ExternalType syntax; for more information, see ExternalType part.

Syntax

  javaLib.storeCopy(
    sourceId javaObjId in,
    targetId javaObjId in)
sourceId
A case-sensitive identifier that refers to an object in the object space or to null. Input can be any variable or expression that is assignment compatible with the STRING type, and is cast to objID. EGL strips single- and double-byte blanks from the beginning and end of the argument value.
targetId
The new case-sensitive identifier, which refers to the same object as sourceId. Input can be any variable or expression that is assignment compatible with the STRING type (see "Assignment compatibility in EGL"), and is cast to objID, as in a later example. EGL strips single- and double-byte blanks from the beginning and end of the argument value.

Example

The following example copies sourceId to a new object in the EGL object space.

  javaLib.storeCopy("sourceId" as "objID:java", 
                    "targetId" as "objID:java");

Feedback