Multimethod

trait Multimethod[Method, A <: AnyRef, R] extends MMRegistry1[Method]

A Multimethod is basically a glorified registry that uses dynamic reflection (and subtyping) to determine which version of the method to invoke.

trait MMRegistry1[Method]
class Object
trait Matchable
class Any

Value members

Abstract methods

protected def doMethod(m: Method, a: A): R

Concrete methods

def apply(a: A): R
protected def bindingMissing(a: A): R
protected def multipleOptions(a: A, m: Map[Class[_], Method]): Nothing
def register[AA <: A](op: Method)(implicit manA: Manifest[AA]): Unit

Inherited methods

def register(a: Class[_], op: Method): Unit
Inherited from
MMRegistry1
protected def resolve(a: Class[_], checkedA: Set[Class[_]]): Map[Class[_], Method]
Inherited from
MMRegistry1
protected def selectBestOption(options: Map[Class[_], Method]): Map[Class[_], Method]

This selects based on the partial order induced by the inheritance hierarchy. If there is ambiguity, all are returned.

This selects based on the partial order induced by the inheritance hierarchy. If there is ambiguity, all are returned.

Inherited from
MMRegistry1

Inherited fields

protected val cache: ConcurrentHashMap[Class[_], Method]
Inherited from
MMRegistry1
protected val ops: HashMap[Class[_], Method]
Inherited from
MMRegistry1