NSExpression+FBFormat.h 1.0 KB

123456789101112131415161718192021222324252627282930
  1. /**
  2. * Copyright (c) 2015-present, Facebook, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. */
  9. #import <Foundation/Foundation.h>
  10. NS_ASSUME_NONNULL_BEGIN
  11. @interface NSExpression (FBFormat)
  12. /**
  13. Method used to normalize/verify NSExpression expressions before passing them to WDA.
  14. Only expressions of NSKeyPathExpressionType are going to be verified.
  15. Allowed property names are only these declared in FBElement protocol (property names are received in runtime)
  16. and their shortcuts (without 'wd' prefix). All other property names are considered as unknown.
  17. @param input expression object received from user input
  18. @return formatted expression
  19. @throw FBUnknownPredicateKeyException in case the given property name is not declared in FBElement protocol
  20. */
  21. + (instancetype)fb_wdExpressionWithExpression:(NSExpression *)input;
  22. @end
  23. NS_ASSUME_NONNULL_END