Class NSRegularExpression

    • Constructor Detail

      • NSRegularExpression

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static NSRegularExpression 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()
      • 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()
      • escapedPatternForString

        @NotNull
        public static @NotNull java.lang.String escapedPatternForString​(@NotNull
                                                                        @NotNull java.lang.String string)
        This class method will produce a string by adding backslash escapes as necessary to the given string, to escape any characters that would otherwise be treated as pattern metacharacters.
      • escapedTemplateForString

        @NotNull
        public static @NotNull java.lang.String escapedTemplateForString​(@NotNull
                                                                         @NotNull java.lang.String string)
        This class method will produce a string by adding backslash escapes as necessary to the given string, to escape any characters that would otherwise be treated as template metacharacters.
      • 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)
      • regularExpressionWithPatternOptionsError

        @Nullable
        public static @Nullable NSRegularExpression regularExpressionWithPatternOptionsError​(@NotNull
                                                                                             @NotNull java.lang.String pattern,
                                                                                             long options,
                                                                                             @Nullable
                                                                                             @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        An instance of NSRegularExpression is created from a regular expression pattern and a set of options. If the pattern is invalid, nil will be returned and an NSError will be returned by reference. The pattern syntax currently supported is that specified by ICU.
      • 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()
      • supportsSecureCoding

        public static boolean supportsSecureCoding()
      • version_static

        public static long version_static()
      • copyWithZone

        @NotNull
        public @NotNull java.lang.Object copyWithZone​(@Nullable
                                                      @Nullable org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        copyWithZone in interface NSCopying
      • enumerateMatchesInStringOptionsRangeUsingBlock

        public void enumerateMatchesInStringOptionsRangeUsingBlock​(@NotNull
                                                                   @NotNull java.lang.String string,
                                                                   long options,
                                                                   NSRange range,
                                                                   @NotNull
                                                                   @NotNull NSRegularExpression.Block_enumerateMatchesInStringOptionsRangeUsingBlock block)
        The fundamental matching method on NSRegularExpression is a block iterator. There are several additional convenience methods, for returning all matches at once, the number of matches, the first match, or the range of the first match. Each match is specified by an instance of NSTextCheckingResult (of type NSTextCheckingTypeRegularExpression) in which the overall match range is given by the range property (equivalent to rangeAtIndex:0) and any capture group ranges are given by rangeAtIndex: for indexes from 1 to numberOfCaptureGroups. {NSNotFound, 0} is used if a particular capture group does not participate in the match.
      • firstMatchInStringOptionsRange

        @Nullable
        public @Nullable NSTextCheckingResult firstMatchInStringOptionsRange​(@NotNull
                                                                             @NotNull java.lang.String string,
                                                                             long options,
                                                                             NSRange range)
      • initWithPatternOptionsError

        public NSRegularExpression initWithPatternOptionsError​(@NotNull
                                                               @NotNull java.lang.String pattern,
                                                               long options,
                                                               @Nullable
                                                               @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
      • matchesInStringOptionsRange

        @NotNull
        public @NotNull NSArray<? extends NSTextCheckingResult> matchesInStringOptionsRange​(@NotNull
                                                                                            @NotNull java.lang.String string,
                                                                                            long options,
                                                                                            NSRange range)
      • numberOfCaptureGroups

        public long numberOfCaptureGroups()
      • numberOfMatchesInStringOptionsRange

        public long numberOfMatchesInStringOptionsRange​(@NotNull
                                                        @NotNull java.lang.String string,
                                                        long options,
                                                        NSRange range)
      • options

        public long options()
      • pattern

        @NotNull
        public @NotNull java.lang.String pattern()
      • rangeOfFirstMatchInStringOptionsRange

        public NSRange rangeOfFirstMatchInStringOptionsRange​(@NotNull
                                                             @NotNull java.lang.String string,
                                                             long options,
                                                             NSRange range)
      • replaceMatchesInStringOptionsRangeWithTemplate

        public long replaceMatchesInStringOptionsRangeWithTemplate​(@NotNull
                                                                   @NotNull NSMutableString string,
                                                                   long options,
                                                                   NSRange range,
                                                                   @NotNull
                                                                   @NotNull java.lang.String templ)
      • replacementStringForResultInStringOffsetTemplate

        @NotNull
        public @NotNull java.lang.String replacementStringForResultInStringOffsetTemplate​(@NotNull
                                                                                          @NotNull NSTextCheckingResult result,
                                                                                          @NotNull
                                                                                          @NotNull java.lang.String string,
                                                                                          long offset,
                                                                                          @NotNull
                                                                                          @NotNull java.lang.String templ)
        For clients implementing their own replace functionality, this is a method to perform the template substitution for a single result, given the string from which the result was matched, an offset to be added to the location of the result in the string (for example, in case modifications to the string moved the result since it was matched), and a replacement template.
      • stringByReplacingMatchesInStringOptionsRangeWithTemplate

        @NotNull
        public @NotNull java.lang.String stringByReplacingMatchesInStringOptionsRangeWithTemplate​(@NotNull
                                                                                                  @NotNull java.lang.String string,
                                                                                                  long options,
                                                                                                  NSRange range,
                                                                                                  @NotNull
                                                                                                  @NotNull java.lang.String templ)
        NSRegularExpression also provides find-and-replace methods for both immutable and mutable strings. The replacement is treated as a template, with $0 being replaced by the contents of the matched range, $1 by the contents of the first capture group, and so on. Additional digits beyond the maximum required to represent the number of capture groups will be treated as ordinary characters, as will a $ not followed by digits. Backslash will escape both $ and itself.
      • _supportsSecureCoding

        public boolean _supportsSecureCoding()
        Description copied from interface: NSSecureCoding
        This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.
        Specified by:
        _supportsSecureCoding in interface NSSecureCoding
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.