@MarshalsPointer public static List<CVImageBufferAttributes> toObject( Class<? extends CFType> cls, long handle, long flags) { CFArray o = (CFArray) CFType.Marshaler.toObject(cls, handle, flags); if (o == null) { return null; } List<CVImageBufferAttributes> list = new ArrayList<>(); for (int i = 0; i < o.size(); i++) { list.add(new CVImageBufferAttributes(o.get(i, CFDictionary.class))); } return list; }
@SuppressWarnings("unchecked") @MarshalsPointer public static List<CVPixelFormatType> toObject( Class<? extends NSObject> cls, long handle, long flags) { NSArray<NSNumber> o = (NSArray<NSNumber>) NSObject.Marshaler.toObject(cls, handle, flags); if (o == null) { return null; } List<CVPixelFormatType> list = new ArrayList<>(); for (NSNumber n : o) { list.add(CVPixelFormatType.valueOf(n.longValue())); } return list; }
@SuppressWarnings("unchecked") @MarshalsPointer public static List<CAEmitterMode> toObject( Class<? extends NSObject> cls, long handle, long flags) { NSArray<NSString> o = (NSArray<NSString>) NSObject.Marshaler.toObject(cls, handle, flags); if (o == null) { return null; } List<CAEmitterMode> list = new ArrayList<>(); for (int i = 0; i < o.size(); i++) { list.add(CAEmitterMode.valueOf(o.get(i))); } return list; }