Class NSBundle

  • All Implemented Interfaces:
    NSObject

    public class NSBundle
    extends NSObject
    Because NSBundle caches allocated instances, subclasses should be prepared to receive an already initialized object back from [super initWithPath:]
    • Constructor Detail

      • NSBundle

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

      • URLForResourceWithExtensionSubdirectoryInBundleWithURL

        public static NSURL URLForResourceWithExtensionSubdirectoryInBundleWithURL​(java.lang.String name,
                                                                                   java.lang.String ext,
                                                                                   java.lang.String subpath,
                                                                                   NSURL bundleURL)
        Methods for locating bundle resources. Instance methods locate resources in the bundle indicated by the receiver; class methods take an argument pointing to a bundle on disk. In the class methods, bundleURL is a URL pointing to the location of a bundle on disk, and may not be nil; bundlePath is the path equivalent of bundleURL, an absolute path pointing to the location of a bundle on disk. By contrast, subpath is a relative path to a subdirectory inside the relevant global or localized resource directory, and should be nil if the resource file in question is not in a subdirectory. Where appropriate, localizationName is the name of a .lproj directory in the bundle, minus the .lproj extension; passing nil for localizationName retrieves only global resources, whereas using a method without this argument retrieves both global and localized resources (using the standard localization search algorithm).
      • URLsForResourcesWithExtensionSubdirectoryInBundleWithURL

        public static NSArray<? extends NSURL> URLsForResourcesWithExtensionSubdirectoryInBundleWithURL​(java.lang.String ext,
                                                                                                        java.lang.String subpath,
                                                                                                        NSURL bundleURL)
      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allFrameworks

        public static NSArray<? extends NSBundle> allFrameworks()
      • alloc

        public static NSBundle alloc()
      • allocWithZone

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

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • bundleForClass

        public static NSBundle bundleForClass​(org.moe.natj.objc.Class aClass)
      • bundleWithIdentifier

        public static NSBundle bundleWithIdentifier​(java.lang.String identifier)
      • bundleWithPath

        public static NSBundle bundleWithPath​(java.lang.String path)
      • bundleWithURL

        public static NSBundle bundleWithURL​(NSURL url)
      • 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()
      • 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)
      • mainBundle

        public static NSBundle mainBundle()
        Methods for creating or retrieving bundle instances.
      • new_objc

        public static java.lang.Object new_objc()
      • pathForResourceOfTypeInDirectory_static

        public static java.lang.String pathForResourceOfTypeInDirectory_static​(java.lang.String name,
                                                                               java.lang.String ext,
                                                                               java.lang.String bundlePath)
      • pathsForResourcesOfTypeInDirectory_static

        public static NSArray<java.lang.String> pathsForResourcesOfTypeInDirectory_static​(java.lang.String ext,
                                                                                          java.lang.String bundlePath)
      • preferredLocalizationsFromArray

        public static NSArray<java.lang.String> preferredLocalizationsFromArray​(NSArray<java.lang.String> localizationsArray)
      • preferredLocalizationsFromArrayForPreferences

        public static NSArray<java.lang.String> preferredLocalizationsFromArrayForPreferences​(NSArray<java.lang.String> localizationsArray,
                                                                                              NSArray<java.lang.String> preferencesArray)
      • 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()
      • URLForAuxiliaryExecutable

        public NSURL URLForAuxiliaryExecutable​(java.lang.String executableName)
      • URLForResourceWithExtension

        public NSURL URLForResourceWithExtension​(java.lang.String name,
                                                 java.lang.String ext)
      • URLForResourceWithExtensionSubdirectory

        public NSURL URLForResourceWithExtensionSubdirectory​(java.lang.String name,
                                                             java.lang.String ext,
                                                             java.lang.String subpath)
      • URLForResourceWithExtensionSubdirectoryLocalization

        public NSURL URLForResourceWithExtensionSubdirectoryLocalization​(java.lang.String name,
                                                                         java.lang.String ext,
                                                                         java.lang.String subpath,
                                                                         java.lang.String localizationName)
      • URLsForResourcesWithExtensionSubdirectory

        public NSArray<? extends NSURL> URLsForResourcesWithExtensionSubdirectory​(java.lang.String ext,
                                                                                  java.lang.String subpath)
      • URLsForResourcesWithExtensionSubdirectoryLocalization

        public NSArray<? extends NSURL> URLsForResourcesWithExtensionSubdirectoryLocalization​(java.lang.String ext,
                                                                                              java.lang.String subpath,
                                                                                              java.lang.String localizationName)
      • appStoreReceiptURL

        public NSURL appStoreReceiptURL()
      • builtInPlugInsPath

        public java.lang.String builtInPlugInsPath()
      • builtInPlugInsURL

        public NSURL builtInPlugInsURL()
      • bundleIdentifier

        public java.lang.String bundleIdentifier()
        Methods for obtaining various information about a bundle.
      • bundlePath

        public java.lang.String bundlePath()
      • bundleURL

        public NSURL bundleURL()
        Methods for locating various components of a bundle.
      • classNamed

        public org.moe.natj.objc.Class classNamed​(java.lang.String className)
      • developmentLocalization

        public java.lang.String developmentLocalization()
      • executableArchitectures

        public NSArray<? extends NSNumber> executableArchitectures()
      • executablePath

        public java.lang.String executablePath()
      • executableURL

        public NSURL executableURL()
      • infoDictionary

        public NSDictionary<java.lang.String,​?> infoDictionary()
      • initWithPath

        public NSBundle initWithPath​(java.lang.String path)
      • isLoaded

        public boolean isLoaded()
      • load_objc

        public boolean load_objc()
        Methods for loading and unloading bundles.
      • loadAndReturnError

        public boolean loadAndReturnError​(org.moe.natj.general.ptr.Ptr<NSError> error)
      • loadNibNamedOwnerOptions

        public NSArray<?> loadNibNamedOwnerOptions​(java.lang.String name,
                                                   java.lang.Object owner,
                                                   NSDictionary<java.lang.String,​?> options)
      • localizations

        public NSArray<java.lang.String> localizations()
        list of language names this bundle appears to be localized to
      • localizedInfoDictionary

        public NSDictionary<java.lang.String,​?> localizedInfoDictionary()
      • localizedStringForKeyValueTable

        public java.lang.String localizedStringForKeyValueTable​(java.lang.String key,
                                                                java.lang.String value,
                                                                java.lang.String tableName)
        Method for retrieving localized strings.
      • objectForInfoDictionaryKey

        public java.lang.Object objectForInfoDictionaryKey​(java.lang.String key)
      • pathForAuxiliaryExecutable

        public java.lang.String pathForAuxiliaryExecutable​(java.lang.String executableName)
      • pathForResourceOfType

        public java.lang.String pathForResourceOfType​(java.lang.String name,
                                                      java.lang.String ext)
      • pathForResourceOfTypeInDirectory

        public java.lang.String pathForResourceOfTypeInDirectory​(java.lang.String name,
                                                                 java.lang.String ext,
                                                                 java.lang.String subpath)
      • pathForResourceOfTypeInDirectoryForLocalization

        public java.lang.String pathForResourceOfTypeInDirectoryForLocalization​(java.lang.String name,
                                                                                java.lang.String ext,
                                                                                java.lang.String subpath,
                                                                                java.lang.String localizationName)
      • pathsForResourcesOfTypeInDirectory

        public NSArray<java.lang.String> pathsForResourcesOfTypeInDirectory​(java.lang.String ext,
                                                                            java.lang.String subpath)
      • pathsForResourcesOfTypeInDirectoryForLocalization

        public NSArray<java.lang.String> pathsForResourcesOfTypeInDirectoryForLocalization​(java.lang.String ext,
                                                                                           java.lang.String subpath,
                                                                                           java.lang.String localizationName)
      • preferredLocalizations

        public NSArray<java.lang.String> preferredLocalizations()
        a subset of this bundle's localizations, re-ordered into the preferred order for this process's current execution environment; the main bundle's preferred localizations indicate the language (of text) the user is most likely seeing in the UI
      • preflightAndReturnError

        public boolean preflightAndReturnError​(org.moe.natj.general.ptr.Ptr<NSError> error)
      • preservationPriorityForTag

        public double preservationPriorityForTag​(java.lang.String tag)
      • principalClass

        public org.moe.natj.objc.Class principalClass()
      • privateFrameworksPath

        public java.lang.String privateFrameworksPath()
      • privateFrameworksURL

        public NSURL privateFrameworksURL()
      • resourcePath

        public java.lang.String resourcePath()
      • resourceURL

        public NSURL resourceURL()
      • setPreservationPriorityForTags

        public void setPreservationPriorityForTags​(double priority,
                                                   NSSet<java.lang.String> tags)
        Set a preservation priority for tags that are included in this bundle for the On Demand Resources system. Preservation priorities may be between 0.0 and 1.0, with higher values being the last choice for purging by the system. The exact meaning of this value is up to your application as it only has meaning within the set of tags your application uses. The default value is 0.0. This method will throw an exception if the receiver bundle has no on demand resource tag information.
      • sharedFrameworksPath

        public java.lang.String sharedFrameworksPath()
      • sharedFrameworksURL

        public NSURL sharedFrameworksURL()
      • sharedSupportPath

        public java.lang.String sharedSupportPath()
      • sharedSupportURL

        public NSURL sharedSupportURL()
      • unload

        public boolean unload()