org.rococoa.cocoa.foundation
Class NSError

java.lang.Object
  extended by org.rococoa.cocoa.foundation.NSObject
      extended by org.rococoa.cocoa.foundation.NSError
All Implemented Interfaces:
NSCoding, NSCopying, NSObject, ObjCObject

public abstract class NSError
extends NSObject
implements ObjCObject, NSCopying, NSCoding

This file was autogenerated by JNAerator,
a tool written by Olivier Chafik that uses a few opensource projects..
For help, please visit NativeLibs4Java, Rococoa, or JNA.


Nested Class Summary
static class NSError._class_
           
 
Nested classes/interfaces inherited from interface org.rococoa.cocoa.foundation.protocols.NSCopying
NSCopying._static_
 
Nested classes/interfaces inherited from interface org.rococoa.cocoa.foundation.protocols.NSCoding
NSCoding._static_
 
Nested classes/interfaces inherited from interface org.rococoa.cocoa.foundation.protocols.NSObject
NSObject._static_
 
Constructor Summary
NSError()
           
 
Method Summary
static NSError alloc()
           
abstract  NSInteger code()
          Original signature : -(NSInteger)code
native declaration : NSError.h:55
static NSError createWithDomain_code_userInfo(NSString domain, NSInteger code, NSDictionary dict)
          Factory method
abstract  NSString domain()
          These define the error.
static NSError errorWithDomain_code_userInfo(NSString domain, NSInteger code, NSDictionary dict)
          Original signature : +(id)errorWithDomain:(NSString*) code:(NSInteger) userInfo:(NSDictionary*)
native declaration : NSError.h:50
static NSError._class_ getNSClass()
           
abstract  NSString helpAnchor()
          Return the help anchor that can be used to create a help button to accompany the error when it's displayed to the user.
abstract  NSError initWithDomain_code_userInfo(NSString domain, NSInteger code, NSDictionary dict)
          Designated initializer.
abstract  NSString localizedDescription()
          The primary user-presentable message for the error.
abstract  NSString localizedFailureReason()
          Return a complete sentence which describes why the operation failed.
abstract  NSArray localizedRecoveryOptions()
          Return titles of buttons that are appropriate for displaying in an alert.
abstract  NSString localizedRecoverySuggestion()
          Return the string that can be displayed as the "informative" (aka "secondary") message on an alert panel.
static NSError new_()
           
abstract  NSObject recoveryAttempter()
          Return an object that conforms to the NSErrorRecoveryAttempting informal protocol.
abstract  NSDictionary userInfo()
          Additional info which may be used to describe the error further.
 
Methods inherited from class org.rococoa.cocoa.foundation.NSObject
as_NSObject_NSAccessibility, as_NSObject_NSAccessibilityAdditions, as_NSObject_NSApplicationScriptingDelegation, as_NSObject_NSArchiverCallback, as_NSObject_NSClassDescriptionPrimitives, as_NSObject_NSCoderMethods, as_NSObject_NSColorPanelResponderMethod, as_NSObject_NSComparisonMethods, as_NSObject_NSControlSubclassNotifications, as_NSObject_NSCopyLinkMoveHandler, as_NSObject_NSDelayedPerforming, as_NSObject_NSDeprecatedKeyValueCoding, as_NSObject_NSDeprecatedKeyValueObservingCustomization, as_NSObject_NSDeprecatedMethods, as_NSObject_NSDictionaryControllerKeyValuePair, as_NSObject_NSDistributedObjects, as_NSObject_NSDraggingDestination, as_NSObject_NSDraggingSource, as_NSObject_NSDraggingSourceDeprecated, as_NSObject_NSEditor, as_NSObject_NSEditorRegistration, as_NSObject_NSErrorRecoveryAttempting, as_NSObject_NSFileManagerFileOperationAdditions, as_NSObject_NSFontManagerDelegate, as_NSObject_NSFontManagerResponderMethod, as_NSObject_NSFontPanelValidationAdditions, as_NSObject_NSKeyValueBindingCreation, as_NSObject_NSKeyValueCoding, as_NSObject_NSKeyValueObserverNotification, as_NSObject_NSKeyValueObserverRegistration, as_NSObject_NSKeyValueObserving, as_NSObject_NSKeyValueObservingCustomization, as_NSObject_NSMenuValidation, as_NSObject_NSNibAwaking, as_NSObject_NSPasteboardOwner, as_NSObject_NSPlaceholders, as_NSObject_NSScriptClassDescription, as_NSObject_NSScripting, as_NSObject_NSScriptingComparisonMethods, as_NSObject_NSScriptKeyValueCoding, as_NSObject_NSScriptObjectSpecifiers, as_NSObject_NSThreadPerformAdditions, as_NSObject_NSURLClient, as_NSObject_NSURLConnectionDelegate, as_NSObject_NSURLDownloadDelegate, copy, create, dealloc, description, doesNotRecognizeSelector, finalize, forwardingTargetForSelector, forwardInvocation, init, isKindOfClass, isKindOfClass, methodForSelector, methodSignatureForSelector, mutableCopy, release, retain, retainCount
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.rococoa.cocoa.foundation.protocols.NSCopying
copyWithZone
 
Methods inherited from interface org.rococoa.cocoa.foundation.protocols.NSCoding
encodeWithCoder, initWithCoder
 
Methods inherited from interface org.rococoa.ObjCObject
id
 
Methods inherited from interface org.rococoa.cocoa.foundation.protocols.NSObject
autorelease, class_, conformsToProtocol, hash, isEqual, isMemberOfClass, isProxy, performSelector_withObject_withObject, performSelector_withObject, performSelector, respondsToSelector, self, superclass, zone
 

Constructor Detail

NSError

public NSError()
Method Detail

initWithDomain_code_userInfo

public abstract NSError initWithDomain_code_userInfo(NSString domain,
                                                     NSInteger code,
                                                     NSDictionary dict)
Designated initializer. Domain cannot be nil; dict may be nil if no userInfo desired.
Original signature : -(id)initWithDomain:(NSString*) code:(NSInteger) userInfo:(NSDictionary*)
native declaration : NSError.h:49


createWithDomain_code_userInfo

public static NSError createWithDomain_code_userInfo(NSString domain,
                                                     NSInteger code,
                                                     NSDictionary dict)
Factory method

See Also:
initWithDomain_code_userInfo(org.rococoa.cocoa.foundation.NSString, org.rococoa.cocoa.foundation.NSInteger, org.rococoa.cocoa.foundation.NSDictionary)

errorWithDomain_code_userInfo

public static NSError errorWithDomain_code_userInfo(NSString domain,
                                                    NSInteger code,
                                                    NSDictionary dict)
Original signature : +(id)errorWithDomain:(NSString*) code:(NSInteger) userInfo:(NSDictionary*)
native declaration : NSError.h:50


domain

public abstract NSString domain()
These define the error. Domains are described by names that are arbitrary strings used to differentiate groups of codes; for custom domain using reverse-DNS naming will help avoid conflicts. Codes are domain-specific.
Original signature : -(NSString*)domain
native declaration : NSError.h:54


code

public abstract NSInteger code()
Original signature : -(NSInteger)code
native declaration : NSError.h:55


userInfo

public abstract NSDictionary userInfo()
Additional info which may be used to describe the error further. Examples of keys that might be included in here are "Line Number", "Failed URL", etc. Embedding other errors in here can also be used as a way to communicate underlying reasons for failures; for instance "File System Error" embedded in the userInfo of an NSError returned from a higher level document object. If the embedded error information is itself NSError, the standard key NSUnderlyingErrorKey can be used.
Original signature : -(NSDictionary*)userInfo
native declaration : NSError.h:59


localizedDescription

public abstract NSString localizedDescription()
The primary user-presentable message for the error. This method can be overridden by subclassers wishing to present better error strings. By default this looks for NSLocalizedDescriptionKey in the user info. If not present, it manufactures a string from the domain and code. Also, for some of the built-in domains it knows about, it might try to fetch an error string by calling a domain-specific function. In the absence of a custom error string, the manufactured one might not be suitable for presentation to the user, but can be used in logs or debugging.
Original signature : -(NSString*)localizedDescription
native declaration : NSError.h:63


localizedFailureReason

public abstract NSString localizedFailureReason()
Return a complete sentence which describes why the operation failed. In many cases this will be just the "because" part of the error message (but as a complete sentence, which makes localization easier). This will return nil if string is not available. Default implementation of this will pick up the value of the NSLocalizedFailureReasonErrorKey from the userInfo dictionary.
Original signature : -(NSString*)localizedFailureReason
native declaration : NSError.h:69


localizedRecoverySuggestion

public abstract NSString localizedRecoverySuggestion()
Return the string that can be displayed as the "informative" (aka "secondary") message on an alert panel. Returns nil if no such string is available. Default implementation of this will pick up the value of the NSLocalizedRecoverySuggestionErrorKey from the userInfo dictionary.
Original signature : -(NSString*)localizedRecoverySuggestion
native declaration : NSError.h:73


localizedRecoveryOptions

public abstract NSArray localizedRecoveryOptions()
Return titles of buttons that are appropriate for displaying in an alert. These should match the string provided as a part of localizedRecoverySuggestion. The first string would be the title of the right-most and default button, the second one next to it, and so on. If used in an alert the corresponding default return values are NSAlertFirstButtonReturn + n. Default implementation of this will pick up the value of the NSLocalizedRecoveryOptionsErrorKey from the userInfo dictionary. nil return usually implies no special suggestion, which would imply a single "OK" button.
Original signature : -(NSArray*)localizedRecoveryOptions
native declaration : NSError.h:77


recoveryAttempter

public abstract NSObject recoveryAttempter()
Return an object that conforms to the NSErrorRecoveryAttempting informal protocol. The recovery attempter must be an object that can correctly interpret an index into the array returned by -localizedRecoveryOptions. The default implementation of this method merely returns [[self userInfo] objectForKey:NSRecoveryAttempterErrorKey].
Original signature : -(id)recoveryAttempter
native declaration : NSError.h:81


helpAnchor

public abstract NSString helpAnchor()
Return the help anchor that can be used to create a help button to accompany the error when it's displayed to the user. This is done automatically by +[NSAlert alertWithError:], which the presentError: variants in NSApplication go through. The default implementation of this method merely returns [[self userInfo] objectForKey:NSHelpAnchorErrorKey].
Original signature : -(NSString*)helpAnchor
native declaration : NSError.h:85


alloc

public static NSError alloc()

new_

public static NSError new_()

getNSClass

public static NSError._class_ getNSClass()


Copyright © 2009. All Rights Reserved.