Class NSExpression

    • Constructor Detail

      • NSExpression

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static NSExpression 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()
      • expressionForAggregate

        @NotNull
        public static @NotNull NSExpression expressionForAggregate​(@NotNull
                                                                   @NotNull NSArray<? extends NSExpression> subexpressions)
        Expression that returns a collection containing the results of other expressions API-Since: 3.0
      • expressionForAnyKey

        @NotNull
        public static @NotNull NSExpression expressionForAnyKey()
        API-Since: 7.0
      • expressionForBlockArguments

        @NotNull
        public static @NotNull NSExpression expressionForBlockArguments​(@NotNull
                                                                        @NotNull NSExpression.Block_expressionForBlockArguments block,
                                                                        @Nullable
                                                                        @Nullable NSArray<? extends NSExpression> arguments)
        Expression that invokes the block with the parameters; note that block expressions are not encodable or representable as parseable strings. API-Since: 4.0
      • expressionForConditionalTrueExpressionFalseExpression

        @NotNull
        public static @NotNull NSExpression expressionForConditionalTrueExpressionFalseExpression​(@NotNull
                                                                                                  @NotNull NSPredicate predicate,
                                                                                                  @NotNull
                                                                                                  @NotNull NSExpression trueExpression,
                                                                                                  @NotNull
                                                                                                  @NotNull NSExpression falseExpression)
        Expression that will return the result of trueExpression or falseExpression depending on the value of predicate API-Since: 9.0
      • expressionForConstantValue

        @NotNull
        public static @NotNull NSExpression expressionForConstantValue​(@Nullable
                                                                       @Nullable java.lang.Object obj)
        Expression that returns a constant value
      • expressionForEvaluatedObject

        @NotNull
        public static @NotNull NSExpression expressionForEvaluatedObject()
        Expression that returns the object being evaluated
      • expressionForFunctionArguments

        @NotNull
        public static @NotNull NSExpression expressionForFunctionArguments​(@NotNull
                                                                           @NotNull java.lang.String name,
                                                                           @NotNull
                                                                           @NotNull NSArray<?> parameters)
        Expression that invokes one of the predefined functions. Will throw immediately if the selector is bad; will throw at runtime if the parameters are incorrect.
      • expressionForFunctionSelectorNameArguments

        @NotNull
        public static @NotNull NSExpression expressionForFunctionSelectorNameArguments​(@NotNull
                                                                                       @NotNull NSExpression target,
                                                                                       @NotNull
                                                                                       @NotNull java.lang.String name,
                                                                                       @Nullable
                                                                                       @Nullable NSArray<?> parameters)
        Expression that invokes the selector on target with parameters. Will throw at runtime if target does not implement selector or if parameters are wrong. API-Since: 3.0
      • expressionForIntersectSetWith

        @NotNull
        public static @NotNull NSExpression expressionForIntersectSetWith​(@NotNull
                                                                          @NotNull NSExpression left,
                                                                          @NotNull
                                                                          @NotNull NSExpression right)
        return an expression that will return the intersection of the collections expressed by left and right API-Since: 3.0
      • expressionForKeyPath

        @NotNull
        public static @NotNull NSExpression expressionForKeyPath​(@NotNull
                                                                 @NotNull java.lang.String keyPath)
        Expression that invokes valueForKeyPath with keyPath
      • expressionForMinusSetWith

        @NotNull
        public static @NotNull NSExpression expressionForMinusSetWith​(@NotNull
                                                                      @NotNull NSExpression left,
                                                                      @NotNull
                                                                      @NotNull NSExpression right)
        return an expression that will return the disjunction of the collections expressed by left and right API-Since: 3.0
      • expressionForSubqueryUsingIteratorVariablePredicate

        @NotNull
        public static @NotNull NSExpression expressionForSubqueryUsingIteratorVariablePredicate​(@NotNull
                                                                                                @NotNull NSExpression expression,
                                                                                                @NotNull
                                                                                                @NotNull java.lang.String variable,
                                                                                                @NotNull
                                                                                                @NotNull NSPredicate predicate)
        Expression that filters a collection by storing elements in the collection in the variable variable and keeping the elements for which qualifer returns true; variable is used as a local variable, and will shadow any instances of variable in the bindings dictionary, the variable is removed or the old value replaced once evaluation completes API-Since: 3.0
      • expressionForUnionSetWith

        @NotNull
        public static @NotNull NSExpression expressionForUnionSetWith​(@NotNull
                                                                      @NotNull NSExpression left,
                                                                      @NotNull
                                                                      @NotNull NSExpression right)
        return an expression that will return the union of the collections expressed by left and right API-Since: 3.0
      • expressionForVariable

        @NotNull
        public static @NotNull NSExpression expressionForVariable​(@NotNull
                                                                  @NotNull java.lang.String string)
        Expression that pulls a value from the variable bindings dictionary
      • expressionWithFormat

        @NotNull
        public static @NotNull NSExpression expressionWithFormat​(@NotNull
                                                                 @NotNull java.lang.String expressionFormat,
                                                                 java.lang.Object... varargs)
        API-Since: 4.0
      • expressionWithFormatArgumentArray

        @NotNull
        public static @NotNull NSExpression expressionWithFormatArgumentArray​(@NotNull
                                                                              @NotNull java.lang.String expressionFormat,
                                                                              @NotNull
                                                                              @NotNull NSArray<?> arguments)
        API-Since: 4.0
      • expressionWithFormatArguments

        @NotNull
        public static @NotNull NSExpression expressionWithFormatArguments​(@NotNull
                                                                          @NotNull java.lang.String expressionFormat,
                                                                          org.moe.natj.general.ptr.BytePtr argList)
        API-Since: 4.0
      • 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)
      • 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()
      • allowEvaluation

        public void allowEvaluation()
        Force an expression which was securely decoded to allow evaluation API-Since: 7.0
      • arguments

        @Nullable
        public @Nullable NSArray<? extends NSExpression> arguments()
        array of expressions which will be passed as parameters during invocation of the selector on the operand of a function expression
      • collection

        @NotNull
        public @NotNull java.lang.Object collection()
        API-Since: 3.0
      • constantValue

        @Nullable
        public @Nullable java.lang.Object constantValue()
      • copyWithZone

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

        public long expressionType()
        accessors for individual parameters - raise if not applicable
      • expressionValueWithObjectContext

        @Nullable
        public @Nullable java.lang.Object expressionValueWithObjectContext​(@Nullable
                                                                           @Nullable java.lang.Object object,
                                                                           @Nullable
                                                                           @Nullable NSMutableDictionary<?,​?> context)
        evaluate the expression using the object and bindings- note that context is mutable here and can be used by expressions to store temporary state for one predicate evaluation
      • falseExpression

        @NotNull
        public @NotNull NSExpression falseExpression()
        expression which will be evaluated if a conditional expression's predicate evaluates to false API-Since: 9.0
      • function

        @NotNull
        public @NotNull java.lang.String function()
      • initWithExpressionType

        public NSExpression initWithExpressionType​(long type)
      • keyPath

        @NotNull
        public @NotNull java.lang.String keyPath()
      • leftExpression

        @NotNull
        public @NotNull NSExpression leftExpression()
        expression which represents the left side of a set expression API-Since: 3.0
      • operand

        @NotNull
        public @NotNull NSExpression operand()
        the object on which the selector will be invoked (the result of evaluating a key path or one of the defined functions)
      • predicate

        @NotNull
        public @NotNull NSPredicate predicate()
        API-Since: 3.0
      • rightExpression

        @NotNull
        public @NotNull NSExpression rightExpression()
        expression which represents the right side of a set expression API-Since: 3.0
      • _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
      • trueExpression

        @NotNull
        public @NotNull NSExpression trueExpression()
        expression which will be evaluated if a conditional expression's predicate evaluates to true API-Since: 9.0
      • variable

        @NotNull
        public @NotNull java.lang.String variable()
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.