public ABPersonDate(NSDate date, String label) { this.date = date; this.label = new CFString(label); } public ABPersonDate(NSDate date, ABPersonDateLabel label) {
public static /*<name>*/CGImageProperty8BIM/*</name>*/ valueOf(/*<type>*/CFString/*</type>*/ value) { for (/*<name>*/CGImageProperty8BIM/*</name>*/ v : values) { if (v.value().equals(value)) { return v; } } throw new IllegalArgumentException("No constant with value " + value + " found in " + /*<name>*/CGImageProperty8BIM/*</name>*/.class.getName()); }
@Override public String toString() { int len = (int) length(); if (len == 0) { return EMPTY_STRING; } char[] chars = new char[len]; getCharacters(getHandle(), new CFRange(0, len), VM.getArrayValuesAddress(chars)); return VM.newStringNoCopy(chars, 0, len); }
@MarshalsPointer public static long toNative(String o, long flags) { if (o == null) { return 0L; } try (CFString s = new CFString(o)) { // retainCount is now 1 s.retain(); // Make sure the retainCount is 1 when we exit this try block // retainCount is now 2 return s.getHandle(); // retainCount is 1 after the return } } @AfterBridgeCall
public String getFirstName() { CFString val = getValue(ABPersonProperty.FirstName, CFString.class); if (val != null) return val.toString(); return null; } public ABPerson setFirstName(String firstName) throws NSErrorException {
public CFString(String s) { int offset = VM.getInt(VM.getObjectAddress(s) + STRING_OFFSET_OFFSET); char[] value = (char[]) VM.getObject(VM.getObjectAddress(s) + STRING_VALUE_OFFSET); long content = VM.getArrayValuesAddress(value) + (offset << 1); setHandle(createWithCharacters(null, content, s.length())); }
public void removeAttribute(CTAttributedStringAttribute attribute, @ByVal NSRange range) { if (attribute == null) { throw new NullPointerException("attribute"); } removeAttribute(attribute.value().as(NSString.class), range); }
@MarshalsPointer public static long toNative(String o, long flags) { if (o == null) { return 0L; } try (CFString s = new CFString(o)) { // retainCount is now 1 s.retain(); // Make sure the retainCount is 1 when we exit this try block // retainCount is now 2 return s.getHandle(); // retainCount is 1 after the return } } @AfterBridgeCall
public String getOrganization() { CFString val = getValue(ABPersonProperty.Organization, CFString.class); if (val != null) return val.toString(); return null; } public ABPerson setOrganization(String organization) throws NSErrorException {
public CFString(String s) { int offset = VM.getInt(VM.getObjectAddress(s) + STRING_OFFSET_OFFSET); char[] value = (char[]) VM.getObject(VM.getObjectAddress(s) + STRING_VALUE_OFFSET); long content = VM.getArrayValuesAddress(value) + (offset << 1); setHandle(createWithCharacters(null, content, s.length())); }
public void addAttribute(CMTextMarkupAttribute attribute, NSObject value, @ByVal NSRange range) { if (attribute == null) { throw new NullPointerException("attribute"); } addAttribute(attribute.value().as(NSString.class), value, range); } public void addAttribute(CTAttributedStringAttribute attribute, NSObject value, @ByVal NSRange range) {
public static /*<name>*/CGImagePropertyIPTCContactInfo/*</name>*/ valueOf(/*<type>*/CFString/*</type>*/ value) { for (/*<name>*/CGImagePropertyIPTCContactInfo/*</name>*/ v : values) { if (v.value().equals(value)) { return v; } } throw new IllegalArgumentException("No constant with value " + value + " found in " + /*<name>*/CGImagePropertyIPTCContactInfo/*</name>*/.class.getName()); }
@Override public String toString() { int len = (int) length(); if (len == 0) { return EMPTY_STRING; } char[] chars = new char[len]; getCharacters(getHandle(), new CFRange(0, len), VM.getArrayValuesAddress(chars)); return VM.newStringNoCopy(chars, 0, len); }
@MarshalsPointer public static long toNative(String o, long flags) { if (o == null) { return 0L; } try (CFString s = new CFString(o)) { // retainCount is now 1 s.retain(); // Make sure the retainCount is 1 when we exit this try block // retainCount is now 2 return s.getHandle(); // retainCount is 1 after the return } } @AfterBridgeCall
@Override public String toString() { try (CFString s = getDescription()) { return s.toString(); } }
public CFString(String s) { int offset = VM.getInt(VM.getObjectAddress(s) + STRING_OFFSET_OFFSET); char[] value = (char[]) VM.getObject(VM.getObjectAddress(s) + STRING_VALUE_OFFSET); long content = VM.getArrayValuesAddress(value) + (offset << 1); setHandle(createWithCharacters(null, content, s.length())); }
public void removeAttribute(CMTextMarkupAttribute attribute, @ByVal NSRange range) { if (attribute == null) { throw new NullPointerException("attribute"); } removeAttribute(attribute.value().as(NSString.class), range); } public void removeAttribute(CTAttributedStringAttribute attribute, @ByVal NSRange range) {
public static /*<name>*/CFURLUbiquitousItemProperty/*</name>*/ valueOf(/*<type>*/CFString/*</type>*/ value) { for (/*<name>*/CFURLUbiquitousItemProperty/*</name>*/ v : values) { if (v.value().equals(value)) { return v; } } throw new IllegalArgumentException("No constant with value " + value + " found in " + /*<name>*/CFURLUbiquitousItemProperty/*</name>*/.class.getName()); }
/** * @since Available in iOS 4.3 and later. */ public boolean equalsTo(CMFormatDescription desc2, String formatDescriptionExtensionKeysToIgnore, String sampleDescriptionExtensionAtomKeysToIgnore) { return equalsTo0(desc2, new CFString(formatDescriptionExtensionKeysToIgnore), new CFString(sampleDescriptionExtensionAtomKeysToIgnore)); } /**