sealed
case class
LoadJSConstructor(className: ClassName)(implicit pos: Position) extends Tree with Product with Serializable
Instance Constructors
-
new
LoadJSConstructor(className: ClassName)(implicit pos: Position)
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
-
def
clone(): AnyRef
-
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
final
def
isInstanceOf[T0]: Boolean
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
implicit
val
pos: Position
-
def
show: String
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Loads the constructor of a JS class (native or not).
className
must represent a non-trait JS class (native or not).This is used typically to instantiate a JS class, and most importantly if it is a non-native JS class. Given the class
The instantiation
new Foo(1)
would be represented asThis node is also useful to encode
o.isInstanceOf[Foo]
:JSBinaryOp(instanceof, o, LoadJSConstructor(ClassName("Foo")))
If
Foo
is non-native, the presence of this node makes it instantiable, and therefore reachable.