Package apple.foundation
Class NSCoder
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.foundation.NSCoder
-
- All Implemented Interfaces:
NSObject
- Direct Known Subclasses:
NSKeyedArchiver,NSKeyedUnarchiver,NSXPCCoder
public class NSCoder extends NSObject
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNSCoder(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static NSCoderalloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)NSSet<? extends org.moe.natj.objc.Class>allowedClasses()Get the current set of allowed classes.booleanallowsKeyedCoding()static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()booleancontainsValueForKey(java.lang.String key)static java.lang.StringdebugDescription_static()voiddecodeArrayOfObjCTypeCountAt(java.lang.String itemType, long count, org.moe.natj.general.ptr.VoidPtr array)NSArray<?>decodeArrayOfObjectsOfClassesForKey(NSSet<? extends org.moe.natj.objc.Class> classes, java.lang.String key)Decodes the \c NSArray object for the given \c key, which should be an \c NSArray, containing the given non-collection classes (no nested arrays or arrays of dictionaries, etc) from the coder.NSArray<?>decodeArrayOfObjectsOfClassForKey(org.moe.natj.objc.Class cls, java.lang.String key)Decodes the \c NSArray object for the given \c key, which should be an \c NSArray, containing the given non-collection class (no nested arrays or arrays of dictionaries, etc) from the coder. booleandecodeBoolForKey(java.lang.String key)org.moe.natj.general.ptr.ConstBytePtrdecodeBytesForKeyReturnedLength(java.lang.String key, org.moe.natj.general.ptr.NUIntPtr lengthp)returned bytes immutable!org.moe.natj.general.ptr.VoidPtrdecodeBytesWithReturnedLength(org.moe.natj.general.ptr.NUIntPtr lengthp)CGAffineTransformdecodeCGAffineTransformForKey(java.lang.String key)CGPointdecodeCGPointForKey(java.lang.String key)CGRectdecodeCGRectForKey(java.lang.String key)CGSizedecodeCGSizeForKey(java.lang.String key)CGVectordecodeCGVectorForKey(java.lang.String key)CMTimedecodeCMTimeForKey(java.lang.String key)CMTimeMappingdecodeCMTimeMappingForKey(java.lang.String key)CMTimeRangedecodeCMTimeRangeForKey(java.lang.String key)NSDatadecodeDataObject()NSDictionary<?,?>decodeDictionaryWithKeysOfClassesObjectsOfClassesForKey(NSSet<? extends org.moe.natj.objc.Class> keyClasses, NSSet<? extends org.moe.natj.objc.Class> objectClasses, java.lang.String key)Decodes the \c NSDictionary object for the given \c key, which should be an \c NSDictionary, with keys of the types given in \c keyClasses and objects of the given non-collection classes in \c objectClasses (no nested dictionaries or other dictionaries contained in the dictionary, etc) from the given coder.NSDictionary<?,?>decodeDictionaryWithKeysOfClassObjectsOfClassForKey(org.moe.natj.objc.Class keyCls, org.moe.natj.objc.Class objectCls, java.lang.String key)Decodes the \c NSDictionary object for the given \c key, which should be an \c NSDictionary, with keys of type given in \c keyCls and objects of the given non-collection class \c objectCls (no nested dictionaries or other dictionaries contained in the dictionary, etc) from the coder. NSDirectionalEdgeInsetsdecodeDirectionalEdgeInsetsForKey(java.lang.String key)doubledecodeDoubleForKey(java.lang.String key)floatdecodeFloatForKey(java.lang.String key)intdecodeInt32ForKey(java.lang.String key)longdecodeInt64ForKey(java.lang.String key)longdecodeIntegerForKey(java.lang.String key)intdecodeIntForKey(java.lang.String key)java.lang.ObjectdecodeObject()java.lang.ObjectdecodeObjectForKey(java.lang.String key)java.lang.ObjectdecodeObjectOfClassesForKey(NSSet<? extends org.moe.natj.objc.Class> classes, java.lang.String key)The class of the object may be any class in the provided NSSet, or a subclass of any class in the set.java.lang.ObjectdecodeObjectOfClassForKey(org.moe.natj.objc.Class aClass, java.lang.String key)Specify what the expected class of the allocated object is.java.lang.ObjectdecodePropertyListForKey(java.lang.String key)Calls -decodeObjectOfClasses:forKey: with a set allowing only property list types.java.lang.ObjectdecodeTopLevelObjectAndReturnError(org.moe.natj.general.ptr.Ptr<NSError> error)java.lang.ObjectdecodeTopLevelObjectForKeyError(java.lang.String key, org.moe.natj.general.ptr.Ptr<NSError> error)java.lang.ObjectdecodeTopLevelObjectOfClassesForKeyError(NSSet<? extends org.moe.natj.objc.Class> classes, java.lang.String key, org.moe.natj.general.ptr.Ptr<NSError> error)java.lang.ObjectdecodeTopLevelObjectOfClassForKeyError(org.moe.natj.objc.Class aClass, java.lang.String key, org.moe.natj.general.ptr.Ptr<NSError> error)UIEdgeInsetsdecodeUIEdgeInsetsForKey(java.lang.String key)UIOffsetdecodeUIOffsetForKey(java.lang.String key)voiddecodeValueOfObjCTypeAt(java.lang.String type, org.moe.natj.general.ptr.VoidPtr data)This method is unsafe because it could potentially cause buffer overruns.voiddecodeValueOfObjCTypeAtSize(java.lang.String type, org.moe.natj.general.ptr.VoidPtr data, long size)voiddecodeValuesOfObjCTypes(java.lang.String types, java.lang.Object... varargs)longdecodingFailurePolicy()Defines the behavior this NSCoder should take on decode failure (i.e. corrupt archive, invalid data, etc.).static java.lang.Stringdescription_static()voidencodeArrayOfObjCTypeCountAt(java.lang.String type, long count, org.moe.natj.general.ptr.ConstVoidPtr array)voidencodeBoolForKey(boolean value, java.lang.String key)voidencodeBycopyObject(java.lang.Object anObject)voidencodeByrefObject(java.lang.Object anObject)voidencodeBytesLength(org.moe.natj.general.ptr.ConstVoidPtr byteaddr, long length)voidencodeBytesLengthForKey(org.moe.natj.general.ptr.ConstBytePtr bytes, long length, java.lang.String key)voidencodeCGAffineTransformForKey(CGAffineTransform transform, java.lang.String key)voidencodeCGPointForKey(CGPoint point, java.lang.String key)voidencodeCGRectForKey(CGRect rect, java.lang.String key)voidencodeCGSizeForKey(CGSize size, java.lang.String key)voidencodeCGVectorForKey(CGVector vector, java.lang.String key)voidencodeCMTimeForKey(CMTime time, java.lang.String key)voidencodeCMTimeMappingForKey(CMTimeMapping timeMapping, java.lang.String key)voidencodeCMTimeRangeForKey(CMTimeRange timeRange, java.lang.String key)voidencodeConditionalObject(java.lang.Object object)voidencodeConditionalObjectForKey(java.lang.Object object, java.lang.String key)voidencodeDataObject(NSData data)voidencodeDirectionalEdgeInsetsForKey(NSDirectionalEdgeInsets insets, java.lang.String key)voidencodeDoubleForKey(double value, java.lang.String key)voidencodeFloatForKey(float value, java.lang.String key)voidencodeInt32ForKey(int value, java.lang.String key)voidencodeInt64ForKey(long value, java.lang.String key)voidencodeIntegerForKey(long value, java.lang.String key)voidencodeIntForKey(int value, java.lang.String key)voidencodeObject(java.lang.Object object)voidencodeObjectForKey(java.lang.Object object, java.lang.String key)voidencodeRootObject(java.lang.Object rootObject)voidencodeUIEdgeInsetsForKey(UIEdgeInsets insets, java.lang.String key)voidencodeUIOffsetForKey(UIOffset offset, java.lang.String key)voidencodeValueOfObjCTypeAt(java.lang.String type, org.moe.natj.general.ptr.ConstVoidPtr addr)voidencodeValuesOfObjCTypes(java.lang.String types, java.lang.Object... varargs)NSErrorerror()The current error (if there is one) for the current TopLevel decode.voidfailWithError(NSError error)Signals to this coder that the decode has failed.static longhash_static()NSCoderinit()static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)static java.lang.Objectnew_objc()booleanrequiresSecureCoding()Returns YES if this coder requires secure coding.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)static voidsetVersion_static(long aVersion)static org.moe.natj.objc.Classsuperclass_static()intsystemVersion()static longversion_static()longversionForClassName(java.lang.String className)-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static NSCoder alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
hash_static
public static long hash_static()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
new_objc
public static java.lang.Object new_objc()
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
version_static
public static long version_static()
-
allowedClasses
public NSSet<? extends org.moe.natj.objc.Class> allowedClasses()
Get the current set of allowed classes.
-
allowsKeyedCoding
public boolean allowsKeyedCoding()
-
containsValueForKey
public boolean containsValueForKey(java.lang.String key)
-
decodeArrayOfObjCTypeCountAt
public void decodeArrayOfObjCTypeCountAt(java.lang.String itemType, long count, org.moe.natj.general.ptr.VoidPtr array)
-
decodeBoolForKey
public boolean decodeBoolForKey(java.lang.String key)
-
decodeBytesForKeyReturnedLength
public org.moe.natj.general.ptr.ConstBytePtr decodeBytesForKeyReturnedLength(java.lang.String key, org.moe.natj.general.ptr.NUIntPtr lengthp)returned bytes immutable!
-
decodeBytesWithReturnedLength
public org.moe.natj.general.ptr.VoidPtr decodeBytesWithReturnedLength(org.moe.natj.general.ptr.NUIntPtr lengthp)
-
decodeCGAffineTransformForKey
public CGAffineTransform decodeCGAffineTransformForKey(java.lang.String key)
-
decodeCGPointForKey
public CGPoint decodeCGPointForKey(java.lang.String key)
-
decodeCGRectForKey
public CGRect decodeCGRectForKey(java.lang.String key)
-
decodeCGSizeForKey
public CGSize decodeCGSizeForKey(java.lang.String key)
-
decodeCGVectorForKey
public CGVector decodeCGVectorForKey(java.lang.String key)
-
decodeCMTimeForKey
public CMTime decodeCMTimeForKey(java.lang.String key)
-
decodeCMTimeMappingForKey
public CMTimeMapping decodeCMTimeMappingForKey(java.lang.String key)
-
decodeCMTimeRangeForKey
public CMTimeRange decodeCMTimeRangeForKey(java.lang.String key)
-
decodeDataObject
public NSData decodeDataObject()
-
decodeDoubleForKey
public double decodeDoubleForKey(java.lang.String key)
-
decodeFloatForKey
public float decodeFloatForKey(java.lang.String key)
-
decodeInt32ForKey
public int decodeInt32ForKey(java.lang.String key)
-
decodeInt64ForKey
public long decodeInt64ForKey(java.lang.String key)
-
decodeIntForKey
public int decodeIntForKey(java.lang.String key)
-
decodeIntegerForKey
public long decodeIntegerForKey(java.lang.String key)
-
decodeObject
public java.lang.Object decodeObject()
-
decodeObjectForKey
public java.lang.Object decodeObjectForKey(java.lang.String key)
-
decodeObjectOfClassForKey
public java.lang.Object decodeObjectOfClassForKey(org.moe.natj.objc.Class aClass, java.lang.String key)Specify what the expected class of the allocated object is. If the coder responds YES to -requiresSecureCoding, then an exception will be thrown if the class to be decoded does not implement NSSecureCoding or is not isKindOfClass: of the argument. If the coder responds NO to -requiresSecureCoding, then the class argument is ignored and no check of the class of the decoded object is performed, exactly as if decodeObjectForKey: had been called.
-
decodeObjectOfClassesForKey
public java.lang.Object decodeObjectOfClassesForKey(NSSet<? extends org.moe.natj.objc.Class> classes, java.lang.String key)
The class of the object may be any class in the provided NSSet, or a subclass of any class in the set. Otherwise, the behavior is the same as -decodeObjectOfClass:forKey:.
-
decodePropertyListForKey
public java.lang.Object decodePropertyListForKey(java.lang.String key)
Calls -decodeObjectOfClasses:forKey: with a set allowing only property list types.
-
decodeTopLevelObjectAndReturnError
public java.lang.Object decodeTopLevelObjectAndReturnError(org.moe.natj.general.ptr.Ptr<NSError> error)
-
decodeTopLevelObjectForKeyError
public java.lang.Object decodeTopLevelObjectForKeyError(java.lang.String key, org.moe.natj.general.ptr.Ptr<NSError> error)
-
decodeTopLevelObjectOfClassForKeyError
public java.lang.Object decodeTopLevelObjectOfClassForKeyError(org.moe.natj.objc.Class aClass, java.lang.String key, org.moe.natj.general.ptr.Ptr<NSError> error)
-
decodeTopLevelObjectOfClassesForKeyError
public java.lang.Object decodeTopLevelObjectOfClassesForKeyError(NSSet<? extends org.moe.natj.objc.Class> classes, java.lang.String key, org.moe.natj.general.ptr.Ptr<NSError> error)
-
decodeUIEdgeInsetsForKey
public UIEdgeInsets decodeUIEdgeInsetsForKey(java.lang.String key)
-
decodeUIOffsetForKey
public UIOffset decodeUIOffsetForKey(java.lang.String key)
-
decodeValueOfObjCTypeAt
public void decodeValueOfObjCTypeAt(java.lang.String type, org.moe.natj.general.ptr.VoidPtr data)This method is unsafe because it could potentially cause buffer overruns. You should use -decodeValueOfObjCType:at:size: instead.
-
decodeValuesOfObjCTypes
public void decodeValuesOfObjCTypes(java.lang.String types, java.lang.Object... varargs)
-
decodingFailurePolicy
public long decodingFailurePolicy()
Defines the behavior this NSCoder should take on decode failure (i.e. corrupt archive, invalid data, etc.). The default result of this property is NSDecodingFailurePolicyRaiseException, subclasses can change this to an alternative policy.
-
encodeArrayOfObjCTypeCountAt
public void encodeArrayOfObjCTypeCountAt(java.lang.String type, long count, org.moe.natj.general.ptr.ConstVoidPtr array)
-
encodeBoolForKey
public void encodeBoolForKey(boolean value, java.lang.String key)
-
encodeBycopyObject
public void encodeBycopyObject(java.lang.Object anObject)
-
encodeByrefObject
public void encodeByrefObject(java.lang.Object anObject)
-
encodeBytesLength
public void encodeBytesLength(org.moe.natj.general.ptr.ConstVoidPtr byteaddr, long length)
-
encodeBytesLengthForKey
public void encodeBytesLengthForKey(org.moe.natj.general.ptr.ConstBytePtr bytes, long length, java.lang.String key)
-
encodeCGAffineTransformForKey
public void encodeCGAffineTransformForKey(CGAffineTransform transform, java.lang.String key)
-
encodeCGPointForKey
public void encodeCGPointForKey(CGPoint point, java.lang.String key)
-
encodeCGRectForKey
public void encodeCGRectForKey(CGRect rect, java.lang.String key)
-
encodeCGSizeForKey
public void encodeCGSizeForKey(CGSize size, java.lang.String key)
-
encodeCGVectorForKey
public void encodeCGVectorForKey(CGVector vector, java.lang.String key)
-
encodeCMTimeForKey
public void encodeCMTimeForKey(CMTime time, java.lang.String key)
-
encodeCMTimeMappingForKey
public void encodeCMTimeMappingForKey(CMTimeMapping timeMapping, java.lang.String key)
-
encodeCMTimeRangeForKey
public void encodeCMTimeRangeForKey(CMTimeRange timeRange, java.lang.String key)
-
encodeConditionalObject
public void encodeConditionalObject(java.lang.Object object)
-
encodeConditionalObjectForKey
public void encodeConditionalObjectForKey(java.lang.Object object, java.lang.String key)
-
encodeDataObject
public void encodeDataObject(NSData data)
-
encodeDoubleForKey
public void encodeDoubleForKey(double value, java.lang.String key)
-
encodeFloatForKey
public void encodeFloatForKey(float value, java.lang.String key)
-
encodeInt32ForKey
public void encodeInt32ForKey(int value, java.lang.String key)
-
encodeInt64ForKey
public void encodeInt64ForKey(long value, java.lang.String key)
-
encodeIntForKey
public void encodeIntForKey(int value, java.lang.String key)
-
encodeIntegerForKey
public void encodeIntegerForKey(long value, java.lang.String key)
-
encodeObject
public void encodeObject(java.lang.Object object)
-
encodeObjectForKey
public void encodeObjectForKey(java.lang.Object object, java.lang.String key)
-
encodeRootObject
public void encodeRootObject(java.lang.Object rootObject)
-
encodeUIEdgeInsetsForKey
public void encodeUIEdgeInsetsForKey(UIEdgeInsets insets, java.lang.String key)
-
encodeUIOffsetForKey
public void encodeUIOffsetForKey(UIOffset offset, java.lang.String key)
-
encodeValueOfObjCTypeAt
public void encodeValueOfObjCTypeAt(java.lang.String type, org.moe.natj.general.ptr.ConstVoidPtr addr)
-
encodeValuesOfObjCTypes
public void encodeValuesOfObjCTypes(java.lang.String types, java.lang.Object... varargs)
-
error
public NSError error()
The current error (if there is one) for the current TopLevel decode. The meaning of this property changes based on the result of the decodingFailurePolicy property: For NSDecodingFailurePolicyRaiseException, this property will always be nil. For NSDecodingFailurePolicySetErrorAndReturn, this property can be non-nil, and if so, indicates that there was a failure while decoding the archive (specifically its the very first error encountered). While .error is non-nil, all attempts to decode data from this coder will return a nil/zero-equivalent value. This error is consumed by a TopLevel decode API (which resets this coder back to a being able to potentially decode data).
-
failWithError
public void failWithError(NSError error)
Signals to this coder that the decode has failed. [@parameter] non-nil error that describes the reason why the decode failed Sets an error on this NSCoder once per TopLevel decode; calling it repeatedly will have no effect until the call stack unwinds to one of the TopLevel decode entry-points. This method is only meaningful to call for decodes. Typically, you would want to call this method in your -initWithCoder: implementation when you detect situations like: - lack of secure coding - corruption of your data - domain validation failures After calling -failWithError: within your -initWithCoder: implementation, you should clean up and return nil as early as possible. Once an error has been signaled to a decoder, it remains set until it has handed off to the first TopLevel decode invocation above it. For example, consider the following call graph: A -decodeTopLevelObjectForKey:error: B -initWithCoder: C -decodeObjectForKey: D -initWithCoder: E -decodeObjectForKey: F -failWithError: In this case the error provided in stack-frame F will be returned via the outError in stack-frame A. Furthermore the result object from decodeTopLevelObjectForKey:error: will be nil, regardless of the result of stack-frame B. NSCoder implementations support two mechanisms for the stack-unwinding from F to A: - forced (NSException based) - particpatory (error based) The kind of unwinding you get is determined by the decodingFailurePolicy property of this NSCoder (which defaults to NSDecodingFailurePolicyRaiseException to match historical behavior).
-
requiresSecureCoding
public boolean requiresSecureCoding()
Returns YES if this coder requires secure coding. Secure coders check a list of allowed classes before decoding objects, and all objects must implement NSSecureCoding.
-
systemVersion
public int systemVersion()
-
versionForClassName
public long versionForClassName(java.lang.String className)
-
decodeDirectionalEdgeInsetsForKey
public NSDirectionalEdgeInsets decodeDirectionalEdgeInsetsForKey(java.lang.String key)
-
decodeValueOfObjCTypeAtSize
public void decodeValueOfObjCTypeAtSize(java.lang.String type, org.moe.natj.general.ptr.VoidPtr data, long size)
-
encodeDirectionalEdgeInsetsForKey
public void encodeDirectionalEdgeInsetsForKey(NSDirectionalEdgeInsets insets, java.lang.String key)
-
decodeArrayOfObjectsOfClassForKey
public NSArray<?> decodeArrayOfObjectsOfClassForKey(org.moe.natj.objc.Class cls, java.lang.String key)
Decodes the \c NSArray object for the given \c key, which should be an \c NSArray, containing the given non-collection class (no nested arrays or arrays of dictionaries, etc) from the coder. Requires \c NSSecureCoding otherwise an exception is thrown and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn. Returns \c nil if the object for \c key is not of the expected types, or cannot be decoded, and sets the \c error on the decoder.
-
decodeArrayOfObjectsOfClassesForKey
public NSArray<?> decodeArrayOfObjectsOfClassesForKey(NSSet<? extends org.moe.natj.objc.Class> classes, java.lang.String key)
Decodes the \c NSArray object for the given \c key, which should be an \c NSArray, containing the given non-collection classes (no nested arrays or arrays of dictionaries, etc) from the coder. Requires \c NSSecureCoding otherwise an exception is thrown and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn. Returns \c nil if the object for \c key is not of the expected types, or cannot be decoded, and sets the \c error on the decoder.
-
decodeDictionaryWithKeysOfClassObjectsOfClassForKey
public NSDictionary<?,?> decodeDictionaryWithKeysOfClassObjectsOfClassForKey(org.moe.natj.objc.Class keyCls, org.moe.natj.objc.Class objectCls, java.lang.String key)
Decodes the \c NSDictionary object for the given \c key, which should be an \c NSDictionary, with keys of type given in \c keyCls and objects of the given non-collection class \c objectCls (no nested dictionaries or other dictionaries contained in the dictionary, etc) from the coder. Requires \c NSSecureCoding otherwise an exception is thrown and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn. Returns \c nil if the object for \c key is not of the expected types, or cannot be decoded, and sets the \c error on the decoder.
-
decodeDictionaryWithKeysOfClassesObjectsOfClassesForKey
public NSDictionary<?,?> decodeDictionaryWithKeysOfClassesObjectsOfClassesForKey(NSSet<? extends org.moe.natj.objc.Class> keyClasses, NSSet<? extends org.moe.natj.objc.Class> objectClasses, java.lang.String key)
Decodes the \c NSDictionary object for the given \c key, which should be an \c NSDictionary, with keys of the types given in \c keyClasses and objects of the given non-collection classes in \c objectClasses (no nested dictionaries or other dictionaries contained in the dictionary, etc) from the given coder. Requires \c NSSecureCoding otherwise an exception is thrown and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn. Returns \c nil if the object for \c key is not of the expected types, or cannot be decoded, and sets the \c error on the decoder.
-
-