Class/Object

com.celadari.jsonlogicscala.evaluate

MethodSignatureFinder

Related Docs: object MethodSignatureFinder | package evaluate

Permalink

class MethodSignatureFinder extends AnyRef

Responsible for finding paths of a compatible classes in case there exists multiple overloaded method versions of operator's method.

Example:
  1. class A, class B extends A conditionsValues(a, b, c) (a object of A, b object of B, c object of C) overloaded methods have the following signatures: overloaded_method(A, A): B overloaded_method(A, B): A overloaded_method(A, C): D overloaded_method(A, D): A overloaded_method(B, A): A overloaded_method(B, C): A overloaded_method(D, C): A then compatible paths are Array((overloaded_method(A, A): B), (overloaded_method(B, C): A)) Array((overloaded_method(A, B): A), (overloaded_method(A, C): D)) This search is used on reduce type operators as conditions might not be the same type and which overloaded method to be applied must be found before evaluation.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MethodSignatureFinder
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MethodSignatureFinder(conditionsValues: Array[Any], confMethod: MethodConf)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  6. val conditionsValues: Array[Any]

    Permalink
  7. val conditionsValuesEval: Stack[Any]

    Permalink
    Attributes
    protected[this]
  8. val confMethod: MethodConf

    Permalink
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def eval(): Unit

    Permalink

    Triggers search for compatible paths with "conditionsValues" and "confMethod".

    Triggers search for compatible paths with "conditionsValues" and "confMethod".

    returns

    set of compatible paths.

  12. def explorePath(value: Any, ownerMethodOpt: Option[Class[_]], path: Array[(Method, Boolean)]): Set[Array[(Method, Boolean)]]

    Permalink

    Returns set of paths.

    Returns set of paths. Set of paths corresponds to the different possible paths that extend "path" by adding an overloaded method compatible with "path"'s last element (class/type is com.celadari.jsonlogicscala.evaluate.MethodConf) return type as first input and value as second input.

    returns

    set of compatible paths.

    Attributes
    protected[this]
  13. def filterExplorable(objClass: Class[_], value: Any, path: Array[(Method, Boolean)]): Set[Method]

    Permalink

    Returns set of overloaded methods of "objClass" that are compatible with return type of the last method of "path" and "value" as first and second input.

    Returns set of overloaded methods of "objClass" that are compatible with return type of the last method of "path" and "value" as first and second input.

    returns

    set of overloaded methods.

    Attributes
    protected[this]
  14. def findFirstMethods(ownerMethod: Any, value1: Any, value2Opt: Option[Any]): Set[Method]

    Permalink

    Returns set of overloaded methods that are compatible with value1 and value2Opt (if defined) as input.

    Returns set of overloaded methods that are compatible with value1 and value2Opt (if defined) as input.

    returns

    set of overloaded methods.

    Attributes
    protected[this]
  15. def findPaths(): Set[Array[(Method, Boolean)]]

    Permalink

    Returns set of optimized compatible paths with "conditionsValues" and "confMethod".

    Returns set of optimized compatible paths with "conditionsValues" and "confMethod". If search has not yet been triggered, it is triggered, otherwise returns cached value.

    returns

    set of compatible paths.

  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  17. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  18. def initializePaths(): Unit

    Permalink

    Initiates parameters values before paths search.

    Initiates parameters values before paths search. Required as first search compares classes/types of "conditionsValues"'s first element and second element while next searches compares classes/types of last element of "paths" and current element of "conditionsValues".

    Attributes
    protected[this]
  19. var isEvaluated: Boolean

    Permalink
    Attributes
    protected[this]
  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  23. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  24. def optimizePaths(): Unit

    Permalink

    Optimizes found paths by removing a path if there exists another path with a method with sub-types input arguments.

    Optimizes found paths by removing a path if there exists another path with a method with sub-types input arguments.

    Example:
    1. class A, class B extends A, class C, class D extends C, class E path1: Array((method(A, C), _), ...) path2: Array((method(A, D), _), ...) path3: Array((method(B, C), _), ...) path4: Array((method(B, D), _), ...) path5: Array((method(A, E), _), ...) optimized paths are path1: Array((method(B, D), _), ...) path5: Array((method(A, E), _), ...)

  25. var paths: Set[Array[(Method, Boolean)]]

    Permalink
    Attributes
    protected[this]
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped