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/Selectable

Selectable

scala.Selectable
See theSelectable companion object

A marker trait for objects that support structural selection viaselectDynamic andapplyDynamic

Implementation classes should define, or make available as extension methods, the following two method signatures:

def selectDynamic(name: String): Anydef applyDynamic(name: String)(args: Any*): Any =

selectDynamic is invoked for simple selectionsv.m, whereasapplyDynamic is invoked for selections with argumentsv.m(...). If there's only one kind of selection, the method supporting the other may be omitted. TheapplyDynamic can also have a second parameter list ofjava.lang.Class arguments, i.e. it may alternatively have the signature

def applyDynamic(name: String, paramClasses: Class[_]*)(args: Any*): Any

In this case the call will synthesizeClass arguments for the erasure of all formal parameter types of the method in the structural type.

Attributes

Companion
object
Source
Selectable.scala
Graph
Supertypes
classAny
Known subtypes
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp