native (original) (raw)
scala.native
class native extends StaticAnnotation
Marker for native methods.
@native def f(x: Int, y: List[Long]): String = ...
A @native
method is compiled to the platform's native method, while discarding the method's body (if any). The body will be type checked if present.
A method marked @native must be a member of a class, not a trait (since 2.12).
Attributes
Source
Graph
Supertypes
trait StaticAnnotation
class Annotation
class Object
trait Matchable
class Any
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL