Package com.avpkit.ferry
Class RefCountedTester
- java.lang.Object
-
- com.avpkit.ferry.RefCounted
-
- com.avpkit.ferry.RefCountedTester
-
public class RefCountedTester extends RefCounted
Internal Only. This object exists in order for the ferry test
libraries to test the memory management functionality
of the RefCounted class from Java.
It is NOT part of the public API.
-
-
Field Summary
-
Fields inherited from class com.avpkit.ferry.RefCounted
swigCMemOwn
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRefCountedTester(long cPtr, boolean cMemoryOwn)Internal Only.protectedRefCountedTester(long cPtr, boolean cMemoryOwn, java.util.concurrent.atomic.AtomicLong ref)Internal Only.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RefCountedTestercopyReference()Create a new RefCountedTester object that is actually referring to the exact same underlying native object.booleanequals(java.lang.Object obj)Compares two values, returning true if the underlying objects in native code are the same object.static longgetCPtr(RefCountedTester obj)Internal Only.longgetMyCPtr()Internal Only.inthashCode()Get a hashable value for this object.static RefCountedTestermake()static RefCountedTestermake(RefCountedTester objToAcquire)Acquires a reference to a passed in object,
and returns the new object.-
Methods inherited from class com.avpkit.ferry.RefCounted
acquire, delete, getCPtr, getCurrentRefCount, getJavaRefCount, release
-
-
-
-
Constructor Detail
-
RefCountedTester
protected RefCountedTester(long cPtr, boolean cMemoryOwn)
Internal Only.
-
RefCountedTester
protected RefCountedTester(long cPtr, boolean cMemoryOwn, java.util.concurrent.atomic.AtomicLong ref)
Internal Only.
-
-
Method Detail
-
getCPtr
public static long getCPtr(RefCountedTester obj)
Internal Only. Not part of public API. Get the raw value of the native object that obj is proxying for.- Parameters:
obj- The java proxy object for a native object.- Returns:
- The raw pointer obj is proxying for.
-
getMyCPtr
public long getMyCPtr()
Internal Only. Not part of public API. Get the raw value of the native object that we're proxying for.- Overrides:
getMyCPtrin classRefCounted- Returns:
- The raw pointer we're proxying for.
-
copyReference
public RefCountedTester copyReference()
Create a new RefCountedTester object that is actually referring to the exact same underlying native object.- Overrides:
copyReferencein classRefCounted- Returns:
- the new Java object.
-
equals
public boolean equals(java.lang.Object obj)
Compares two values, returning true if the underlying objects in native code are the same object. That means you can have two different Java objects, but when you do a comparison, you'll find out they are the EXACT same object.- Overrides:
equalsin classjava.lang.Object- Returns:
- True if the underlying native object is the same. False otherwise.
-
hashCode
public int hashCode()
Get a hashable value for this object.- Overrides:
hashCodein classjava.lang.Object- Returns:
- the hashable value.
-
make
public static RefCountedTester make()
-
make
public static RefCountedTester make(RefCountedTester objToAcquire)
Acquires a reference to a passed in object,
and returns the new object. This, when wrapped
by Swig, will be wrapped in a new Java object.
-
-