final
object
SAMType
An extractor for single abstract method types. A type is a SAM type if it is a reference to a class or trait, which
- has a single abstract method with a method type (ExprType and PolyType not allowed!)
- can be instantiated without arguments or with just () as argument.
The pattern SAMType(denot)
matches a SAM type, where denot
is the
denotation of the single abstract method as a member of the type.
Constructors
Members
def
isInstantiatable
(
tp:
Type
)
(
implicit
ctx:
Context
)
: Boolean
def
unapply
(
tp:
Type
)
(
implicit
ctx:
Context
)
: Option
[
SingleDenotation
]
def
zeroParamClass
(
tp:
Type
)
(
implicit
ctx:
Context
)
: Type