Package com.sun.jna.platform.mac

# Class CoreFoundation.CFArrayRef

java.lang.Object
com.sun.jna.PointerType
com.sun.jna.platform.mac.CoreFoundation.CFTypeRef
com.sun.jna.platform.mac.CoreFoundation.CFArrayRef

All Implemented Interfaces:
  `NativeMapped`

Enclosing interface:
  CoreFoundation

public static class CoreFoundation.CFArrayRef extends CoreFoundation.CFTypeRef
A reference to an immutable `CFArray` object.

CFArray is “toll-free bridged” with its Cocoa Foundation counterpart, `NSArray`. Therefore, in a method where you see an `NSArray *` parameter, you can pass in a `CFArrayRef` .

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CFArrayRef()`
  `CFArrayRef(Pointer p)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getCount()`
  Convenience method for `CoreFoundation.CFArrayGetCount(com.sun.jna.platform.mac.CoreFoundation.CFArrayRef)` on this object
  `Pointer`
  `getValueAtIndex(int idx)`
  Convenience method for `CoreFoundation.CFArrayGetValueAtIndex(com.sun.jna.platform.mac.CoreFoundation.CFArrayRef, com.sun.jna.platform.mac.CoreFoundation.CFIndex)` on this object

  ### Methods inherited from class com.sun.jna.platform.mac.CoreFoundation.CFTypeRef

  `getTypeID, isTypeID, release, retain`

  ### Methods inherited from class com.sun.jna.PointerType

  `equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toString`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### CFArrayRef

    public CFArrayRef()

  - ### CFArrayRef

    public CFArrayRef(Pointer p)

- ## Method Details

  - ### getCount

    public int getCount()
    Convenience method for `CoreFoundation.CFArrayGetCount(com.sun.jna.platform.mac.CoreFoundation.CFArrayRef)` on this object
    Returns:
      The number of values in this array.

  - ### getValueAtIndex

    public Pointer getValueAtIndex(int idx)
    Convenience method for `CoreFoundation.CFArrayGetValueAtIndex(com.sun.jna.platform.mac.CoreFoundation.CFArrayRef, com.sun.jna.platform.mac.CoreFoundation.CFIndex)` on this object
    Parameters:
      `idx` - The index of the value to retrieve.
    Returns:
      The value at the `idx` index.