Owner

zio.blocks.typeid.Owner
See theOwner companion object
final case class Owner(segments: List[Segment])

Represents where a type is defined in the Scala/Java ecosystem.

An Owner encapsulates the hierarchical ownership chain of a type, which can include packages, terms (objects/values), and types.

For example, for a type MyClass defined as:

package com.example
object Outer {
 class MyClass
}

The owner would be:

Owner(List(
 Owner.Package("com"),
 Owner.Package("example"),
 Owner.Term("Outer")
))

Attributes

Companion
object
Source
Owner.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def /(pkg: String): Owner

Appends a package segment to this owner.

Appends a package segment to this owner.

Attributes

Source
Owner.scala
def asString: String

Returns the owner path as a dot-separated string.

Returns the owner path as a dot-separated string.

Attributes

Source
Owner.scala
def isRoot: Boolean

Returns true if this owner represents the root (empty) owner.

Returns true if this owner represents the root (empty) owner.

Attributes

Source
Owner.scala
def lastName: String

Returns the last segment's name, or empty string if root.

Returns the last segment's name, or empty string if root.

Attributes

Source
Owner.scala
def parent: Owner

Returns the parent owner, or Root if this is already the root.

Returns the parent owner, or Root if this is already the root.

Attributes

Source
Owner.scala
def term(name: String): Owner

Appends a term segment to this owner.

Appends a term segment to this owner.

Attributes

Source
Owner.scala
def tpe(name: String): Owner

Appends a type segment to this owner.

Appends a type segment to this owner.

Attributes

Source
Owner.scala

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala