Movatterモバイル変換


[0]ホーム

URL:


Scala 3
3.7.4
LearnInstallPlaygroundFind A LibraryCommunityBlog
Scala 3
LearnInstallPlaygroundFind A LibraryCommunityBlog
DocsAPI
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL
Scala 3/scala/scala.annotation/publicInBinary

publicInBinary

scala.annotation.publicInBinary

A binary API is a definition that is annotated with@publicInBinary. This annotation can be placed ondef,val,lazy val,var, class constructors,object, andgiven definitions. A binary API will be publicly available in the bytecode. Tools like TASTy MiMa will take this into account to check compatibility.

This annotation cannot be used onprivate/private[this] definitions.

@publicInBinary can be used to guarantee access toprivate[T]/protected definitions:

  • within inline definitions,
  • against previous binary where this definitions was public or less private,
  • or through JVM reflection.

Removing this annotation from a non-public definition is a binary incompatible change. Adding this annotation to a non-public definition can also cause binary incompatibilities if the definition is accessed in an inline definition (these can be checked using-WunstableInlineAccessors).

Attributes

Source
publicInBinary.scala
Graph
Supertypes
classObject
traitMatchable
classAny
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp