package core
- Alphabetic
- Public
- Protected
Type Members
- final case class Clone[+T](isClone: IsClone[T]) extends Underlying[T] with Product with Serializable
A clone of a real implementation
- final case class Definition[+A] extends IsLookupable with SealedHierarchy[A] with Product with Serializable
User-facing Definition type.
User-facing Definition type. Represents a definition of an object of type
A
which are marked as @instantiable Can be created using Definition.apply method.These definitions are then used to create multiple Instances.
- sealed trait Hierarchy[+A] extends AnyRef
Super-trait for Instance and Definition
Super-trait for Instance and Definition
Enables writing functions which are Instance/Definition agnostic
- case class ImportDefinitionAnnotation[T <: BaseModule with IsInstantiable](definition: Definition[T], overrideDefName: Option[String] = None) extends NoTargetAnnotation with Product with Serializable
Stores a Definition that is imported so that its Instances can be compiled separately.
- final case class Instance[+A] extends SealedHierarchy[A] with Product with Serializable
User-facing Instance type.
User-facing Instance type. Represents a unique instance of type
A
which are marked as @instantiable Can be created using Instance.apply method. - trait IsClone[+T] extends AnyRef
Represents a clone of an underlying object.
Represents a clone of an underlying object. This is used to support CloneModuleAsRecord and Instance/Definition.
- Note
We don't actually "clone" anything in the traditional sense but is a placeholder so we lazily clone internal state
- trait IsInstantiable extends AnyRef
While this is public, it is not recommended for users to extend directly.
While this is public, it is not recommended for users to extend directly. Instead, use the instantiable annotation on your trait or class.
This trait indicates whether a class can be returned from an Instance.
- trait IsLookupable extends AnyRef
A User-extendable trait to mark metadata-containers, e.g.
A User-extendable trait to mark metadata-containers, e.g. parameter case classes, as valid to return unchanged from an instance.
This should only be true of the metadata returned is identical for ALL instances!
For instances of the same proto, metadata or other construction parameters may be useful to access outside of the instance construction. For parameters that are the same for all instances, we should mark it as IsLookupable
case class Params(debugMessage: String) extends IsLookupable class MyModule(p: Params) extends Module { printf(p.debugMessage) } val myParams = Params("Hello World") val definition = Definition(new MyModule(myParams)) val i0 = Instance(definition) val i1 = Instance(definition) require(i0.p == i1.p) // p is only accessable because it extends IsLookupable
Example: - trait Lookupable[-B] extends AnyRef
Represents lookup typeclass to determine how a value accessed from an original IsInstantiable should be tweaked to return the Instance's version Sealed.
Represents lookup typeclass to determine how a value accessed from an original IsInstantiable should be tweaked to return the Instance's version Sealed.
- Annotations
- @implicitNotFound()
- final case class Proto[+T](proto: T) extends Underlying[T] with Product with Serializable
An actual implementation
- sealed trait Underlying[+T] extends AnyRef
Represents the underlying implementation of a Definition or Instance
Value Members
- object Definition extends SourceInfoDoc with Serializable
Factory methods for constructing Definitions
- object Hierarchy
- object Instance extends SourceInfoDoc with Serializable
Factory methods for constructing Instances
- object IsInstantiable
- object Lookupable