Class NSKeyedUnarchiver

    • Constructor Detail

      • NSKeyedUnarchiver

        protected NSKeyedUnarchiver​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static NSKeyedUnarchiver allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForClassName_static

        @Nullable
        public static @Nullable org.moe.natj.objc.Class classForClassName_static​(@NotNull
                                                                                 @NotNull java.lang.String codedName)
        During decoding, the coder first checks with the coder's own table, then if there was no mapping there, the class's.
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull 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()
      • 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

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setClassForClassName_static

        public static void setClassForClassName_static​(@Nullable
                                                       @Nullable org.moe.natj.objc.Class cls,
                                                       @NotNull
                                                       @NotNull java.lang.String codedName)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • unarchiveObjectWithData

        @Nullable
        @Deprecated
        public static @Nullable java.lang.Object unarchiveObjectWithData​(@NotNull
                                                                         @NotNull NSData data)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 12.0 Deprecated-Message: Use +unarchivedObjectOfClass:fromData:error: instead
      • unarchiveObjectWithFile

        @Nullable
        @Deprecated
        public static @Nullable java.lang.Object unarchiveObjectWithFile​(@NotNull
                                                                         @NotNull java.lang.String path)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 12.0 Deprecated-Message: Use +unarchivedObjectOfClass:fromData:error: instead
      • unarchiveTopLevelObjectWithDataError

        @Nullable
        @Deprecated
        public static @Nullable java.lang.Object unarchiveTopLevelObjectWithDataError​(@NotNull
                                                                                      @NotNull NSData data,
                                                                                      @Nullable
                                                                                      @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 12.0 Deprecated-Message: Use +unarchivedObjectOfClass:fromData:error: instead
      • version_static

        public static long version_static()
      • classForClassName

        @Nullable
        public @Nullable org.moe.natj.objc.Class classForClassName​(@NotNull
                                                                   @NotNull java.lang.String codedName)
      • containsValueForKey

        public boolean containsValueForKey​(@NotNull
                                           @NotNull java.lang.String key)
        Overrides:
        containsValueForKey in class NSCoder
      • decodeBoolForKey

        public boolean decodeBoolForKey​(@NotNull
                                        @NotNull java.lang.String key)
        Overrides:
        decodeBoolForKey in class NSCoder
      • decodeBytesForKeyReturnedLength

        @Nullable
        public @Nullable org.moe.natj.general.ptr.ConstBytePtr decodeBytesForKeyReturnedLength​(@NotNull
                                                                                               @NotNull java.lang.String key,
                                                                                               @Nullable
                                                                                               @Nullable org.moe.natj.general.ptr.NUIntPtr lengthp)
        returned bytes immutable, and they go away with the unarchiver, not the containing autorelease pool
        Overrides:
        decodeBytesForKeyReturnedLength in class NSCoder
      • decodeDoubleForKey

        public double decodeDoubleForKey​(@NotNull
                                         @NotNull java.lang.String key)
        Overrides:
        decodeDoubleForKey in class NSCoder
      • decodeFloatForKey

        public float decodeFloatForKey​(@NotNull
                                       @NotNull java.lang.String key)
        Overrides:
        decodeFloatForKey in class NSCoder
      • decodeInt32ForKey

        public int decodeInt32ForKey​(@NotNull
                                     @NotNull java.lang.String key)
        Overrides:
        decodeInt32ForKey in class NSCoder
      • decodeInt64ForKey

        public long decodeInt64ForKey​(@NotNull
                                      @NotNull java.lang.String key)
        Overrides:
        decodeInt64ForKey in class NSCoder
      • decodeIntForKey

        public int decodeIntForKey​(@NotNull
                                   @NotNull java.lang.String key)
        may raise a range exception
        Overrides:
        decodeIntForKey in class NSCoder
      • decodeObjectForKey

        @Nullable
        public @Nullable java.lang.Object decodeObjectForKey​(@NotNull
                                                             @NotNull java.lang.String key)
        Overrides:
        decodeObjectForKey in class NSCoder
      • finishDecoding

        public void finishDecoding()
      • init

        @Deprecated
        public NSKeyedUnarchiver init()
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 12.0 Deprecated-Message: Use -initForReadingFromData:error: instead
        Overrides:
        init in class NSCoder
      • initForReadingWithData

        @Deprecated
        public NSKeyedUnarchiver initForReadingWithData​(@NotNull
                                                        @NotNull NSData data)
        Deprecated.
        API-Since: 2.0 Deprecated-Since: 12.0 Deprecated-Message: Use -initForReadingFromData:error: instead
      • requiresSecureCoding

        public boolean requiresSecureCoding()
        Enables secure coding support on this keyed unarchiver. When enabled, unarchiving a disallowed class throws an exception. Once enabled, attempting to set requiresSecureCoding to NO will throw an exception. This is to prevent classes from selectively turning secure coding off. This is designed to be set once at the top level and remain on. Note that the getter is on the superclass, NSCoder. See NSCoder for more information about secure coding. API-Since: 6.0
        Overrides:
        requiresSecureCoding in class NSCoder
      • setClassForClassName

        public void setClassForClassName​(@Nullable
                                         @Nullable org.moe.natj.objc.Class cls,
                                         @NotNull
                                         @NotNull java.lang.String codedName)
      • setDecodingFailurePolicy

        public void setDecodingFailurePolicy​(long value)
        API-Since: 9.0
      • setRequiresSecureCoding

        public void setRequiresSecureCoding​(boolean value)
        Enables secure coding support on this keyed unarchiver. When enabled, unarchiving a disallowed class throws an exception. Once enabled, attempting to set requiresSecureCoding to NO will throw an exception. This is to prevent classes from selectively turning secure coding off. This is designed to be set once at the top level and remain on. Note that the getter is on the superclass, NSCoder. See NSCoder for more information about secure coding. API-Since: 6.0
      • initForReadingFromDataError

        public NSKeyedUnarchiver initForReadingFromDataError​(@NotNull
                                                             @NotNull NSData data,
                                                             @Nullable
                                                             @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Initializes the receiver for decoding an archive previously encoded by \c NSKeyedUnarchiver. Enables \c requiresSecureCoding by default. If \c NSSecureCoding cannot be used, \c requiresSecureCoding may be turned off manually; for improved security, \c requiresSecureCoding should be left enabled whenever possible. Sets the unarchiver's \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn. Returns \c nil if the given data is not valid, and sets the \c error out parameter. API-Since: 11.0
      • unarchivedObjectOfClassFromDataError

        @Nullable
        public static @Nullable java.lang.Object unarchivedObjectOfClassFromDataError​(@NotNull
                                                                                      @NotNull org.moe.natj.objc.Class cls,
                                                                                      @NotNull
                                                                                      @NotNull NSData data,
                                                                                      @Nullable
                                                                                      @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Decodes the root object of the given class from the given archive, previously encoded by \c NSKeyedArchiver. Enables \c requiresSecureCoding and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn. Returns \c nil if the given data is not valid or cannot be decoded, and sets the \c error out parameter. API-Since: 11.0
      • unarchivedObjectOfClassesFromDataError

        @Nullable
        public static @Nullable java.lang.Object unarchivedObjectOfClassesFromDataError​(@NotNull
                                                                                        @NotNull NSSet<? extends org.moe.natj.objc.Class> classes,
                                                                                        @NotNull
                                                                                        @NotNull NSData data,
                                                                                        @Nullable
                                                                                        @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Decodes the root object of one of the given classes from the given archive, previously encoded by \c NSKeyedArchiver. Enables \c requiresSecureCoding and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn. Returns \c nil if the given data is not valid or cannot be decoded, and sets the \c error out parameter. API-Since: 11.0
      • unarchivedArrayOfObjectsOfClassFromDataError

        @Nullable
        public static @Nullable NSArray<?> unarchivedArrayOfObjectsOfClassFromDataError​(@NotNull
                                                                                        @NotNull org.moe.natj.objc.Class cls,
                                                                                        @NotNull
                                                                                        @NotNull NSData data,
                                                                                        @Nullable
                                                                                        @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Decodes the \c NSArray root object from \c data which should be an \c NSArray containing the given non-collection class (no nested arrays or arrays of dictionaries, etc) from the given archive, previously encoded by \c NSKeyedArchiver. Enables \c requiresSecureCoding and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn. Returns \c nil if the given data is not valid or cannot be decoded, and sets the \c error out parameter. API-Since: 14.0
      • unarchivedArrayOfObjectsOfClassesFromDataError

        @Nullable
        public static @Nullable NSArray<?> unarchivedArrayOfObjectsOfClassesFromDataError​(@NotNull
                                                                                          @NotNull NSSet<? extends org.moe.natj.objc.Class> classes,
                                                                                          @NotNull
                                                                                          @NotNull NSData data,
                                                                                          @Nullable
                                                                                          @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Decodes the \c NSArray root object from \c data which should be an \c NSArray, containing the given non-collection classes in \c classes (no nested arrays or arrays of dictionaries, etc) from the given archive, previously encoded by \c NSKeyedArchiver. Enables \c requiresSecureCoding and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn. Returns \c nil if the given data is not valid or cannot be decoded, and sets the \c error out parameter. API-Since: 14.0
      • unarchivedDictionaryWithKeysOfClassObjectsOfClassFromDataError

        @Nullable
        public static @Nullable NSDictionary<?,​?> unarchivedDictionaryWithKeysOfClassObjectsOfClassFromDataError​(@NotNull
                                                                                                                       @NotNull org.moe.natj.objc.Class keyCls,
                                                                                                                       @NotNull
                                                                                                                       @NotNull org.moe.natj.objc.Class valueCls,
                                                                                                                       @NotNull
                                                                                                                       @NotNull NSData data,
                                                                                                                       @Nullable
                                                                                                                       @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Decodes the \c NSDictionary root object from \c data 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 given archive, previously encoded by \c NSKeyedArchiver. Enables \c requiresSecureCoding and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn. Returns \c nil if the given data is not valid or cannot be decoded, and sets the \c error out parameter. API-Since: 14.0
      • unarchivedDictionaryWithKeysOfClassesObjectsOfClassesFromDataError

        @Nullable
        public static @Nullable NSDictionary<?,​?> unarchivedDictionaryWithKeysOfClassesObjectsOfClassesFromDataError​(@NotNull
                                                                                                                           @NotNull NSSet<? extends org.moe.natj.objc.Class> keyClasses,
                                                                                                                           @NotNull
                                                                                                                           @NotNull NSSet<? extends org.moe.natj.objc.Class> valueClasses,
                                                                                                                           @NotNull
                                                                                                                           @NotNull NSData data,
                                                                                                                           @Nullable
                                                                                                                           @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Decodes the \c NSDictionary root object from \c data 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 archive, previously encoded by \c NSKeyedArchiver. Enables \c requiresSecureCoding and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn. Returns \c nil if the given data is not valid or cannot be decoded, and sets the \c error out parameter. API-Since: 14.0
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.