Package io.opentimeline
Class OTIONative
java.lang.Object
io.opentimeline.OTIONative
- All Implemented Interfaces:
java.lang.AutoCloseable
public class OTIONative
extends java.lang.Object
implements java.lang.AutoCloseable
A class that holds the native handle and class name of an OTIO object.
It implements the AutoCloseable interface which adds the close() method.
This method can be called to free the native memory and is called automatically
on exit from scope when this object will be declared in a try-with-resources block.
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
className
long
nativeHandle
-
Constructor Summary
Constructors Constructor Description OTIONative(long nativeHandle)
-
Method Summary
Modifier and Type Method Description void
close()
long
getOTIOObjectNativeHandle()
This method returns the native handle of the actual native object.
-
Field Details
-
nativeHandle
public long nativeHandle -
className
public java.lang.String className
-
-
Constructor Details
-
OTIONative
public OTIONative(long nativeHandle)
-
-
Method Details
-
getOTIOObjectNativeHandle
public long getOTIOObjectNativeHandle()This method returns the native handle of the actual native object. It can be used to check if two different Java objects hold reference to the same native object. This is used to generate hash codes for OTIO objects so that they can be added to HashMaps.- Returns:
- native handle of the actual native object
-
close
public void close() throws java.lang.Exception- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.lang.Exception
-