Class 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.
    • 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:
        getMyCPtr in class RefCounted
        Returns:
        The raw pointer we're proxying for.
      • 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:
        equals in class java.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:
        hashCode in class java.lang.Object
        Returns:
        the hashable value.
      • 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.