Import

zio.blocks.codegen.ir.Import
See theImport companion trait
object Import

Attributes

Companion
trait
Source
Import.scala
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Import.type

Members list

Type members

Classlikes

final case class GroupImport(path: String, names: List[String]) extends Import

A group import that imports multiple names from a package.

A group import that imports multiple names from a package.

Value parameters

names

The imported names (e.g., List("Foo", "Bar"))

path

The package path (e.g., "com.example")

Attributes

Example
val imp = GroupImport("com.example", List("Foo", "Bar"))
// Represents: import com.example.{Foo, Bar}
Source
Import.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Import
class Object
trait Matchable
class Any
Show all
final case class RenameImport(path: String, from: String, to: String) extends Import

A rename import that imports a name under an alias.

A rename import that imports a name under an alias.

Value parameters

from

The original name (e.g., "Foo")

path

The package path (e.g., "com.example")

to

The alias name (e.g., "Bar")

Attributes

Example
val imp = RenameImport("com.example", "Foo", "Bar")
// Represents: import com.example.{Foo => Bar} (Scala 2) or import com.example.{Foo as Bar} (Scala 3)
Source
Import.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Import
class Object
trait Matchable
class Any
Show all
final case class SingleImport(path: String, name: String) extends Import

A single-name import.

A single-name import.

Value parameters

name

The imported name (e.g., "Foo")

path

The package path (e.g., "com.example")

Attributes

Example
val imp = SingleImport("com.example", "Foo")
// Represents: import com.example.Foo
Source
Import.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Import
class Object
trait Matchable
class Any
Show all
final case class WildcardImport(path: String) extends Import

A wildcard import that imports all members of a package.

A wildcard import that imports all members of a package.

Value parameters

path

The package path (e.g., "com.example")

Attributes

Example
val imp = WildcardImport("com.example")
// Represents: import com.example._ (Scala 2) or import com.example.* (Scala 3)
Source
Import.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Import
class Object
trait Matchable
class Any
Show all

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
Source
Mirror.scala
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror
Source
Mirror.scala