Class

scala.reflect.api.Types

MethodTypeExtractor

Related Doc: package Types

Permalink

abstract class MethodTypeExtractor extends AnyRef

An extractor class to create and pattern match with syntax MethodType(params, respte) Here, params is a potentially empty list of parameter symbols of the method, and restpe is the result type of the method. If the method is curried, restpe would be another MethodType. Note: MethodType(Nil, Int) would be the type of a method defined with an empty parameter list.

def f(): Int

If the method is completely parameterless, as in

def f: Int

its type is a NullaryMethodType.

Source
Types.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MethodTypeExtractor
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MethodTypeExtractor()

    Permalink

Abstract Value Members

  1. abstract def unapply(tpe: Universe.MethodType): Option[(List[Universe.Symbol], Universe.Type)]

    Permalink

Deprecated Value Members

  1. def apply(params: List[Universe.Symbol], resultType: Universe.Type)(implicit token: Universe.CompatToken): Universe.MethodType

    Permalink

    Annotations
    @deprecated
    Deprecated

    (Since version 2.11.0) Use internal.methodType instead

    See also

    InternalApi.methodType