final case class ClosureType(paramTypes: List[Type], resultType: Type, nullable: Boolean) extends Type with Product with Serializable
Closure type.
This is the type of a typed closure. Parameters and result are
statically typed according to the closureTypeRef components.
Closure types may be nullable. Null() is a valid value of a nullable
closure type. This is unfortunately required to have default values of
closure types, which in turn is required to be used as the type of a
field.
Closure types are non-variant in both parameter and result types.
Closure types are *not* subtypes of AnyType. That statically prevents
them from going into JavaScript code or in any other universal context.
They do not support type tests nor casts.
The following subtyping relationships hold for any closure type CT:
nothing <: CT <: void
For a nullable closure type CT, additionally the following subtyping
relationship holds:
null <: CT
- Alphabetic
- By Inheritance
- ClosureType
- Serializable
- Product
- Equals
- Type
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isNullable: Boolean
Is
nullan admissible value of this type?Is
nullan admissible value of this type?- Definition Classes
- Type
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val nullable: Boolean
- val paramTypes: List[Type]
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val resultType: Type
- def show(): String
- Definition Classes
- Type
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toNonNullable: ClosureType
A type that accepts the same values as this type except
null, unless this type isVoidType.A type that accepts the same values as this type except
null, unless this type isVoidType.If
thisisVoidType, returns this type.For all other types
tpe,tpe.toNonNullable.isNullableisfalse.- Definition Classes
- ClosureType → Type
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()