RequireScopeDirectiveHandler

scala.build.preprocessing.directives.RequireScopeDirectiveHandler$

Attributes

Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait DirectiveHandler[BuildRequirements]
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Type members

Inherited types

type MirroredElemLabels = EmptyTuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Singleton
type MirroredElemTypes = EmptyTuple

Attributes

Inherited from:
Singleton
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
type MirroredMonoType = Singleton.this.type

The mirrored *-type

The mirrored *-type

Attributes

Inherited from:
Singleton
type MirroredType = Singleton.this.type

Attributes

Inherited from:
Singleton

Attributes

Inherited from:
RequireDirectiveHandler

Value members

Concrete methods

def description: String
override def examples: Seq[String]

Attributes

Definition Classes

by default, it is (lower = 1, upper = Int.MaxValue). Please, override for other cases.

by default, it is (lower = 1, upper = Int.MaxValue). Please, override for other cases.

Attributes

key

the using directive key for which the value number bounds are calculated.

Definition Classes
def handleValues(scopedDirective: ScopedDirective, logger: Logger): Either[BuildException, ProcessedRequireDirective]
def keys: Seq[String]
def name: String
def usage: String
override def usageMd: String

Attributes

Definition Classes

Inherited methods

protected def SpecificationLevel: SpecificationLevel.type

Attributes

Inherited from:
DirectiveHandler

It checks the values ascribed to the key inside the passed in scopedDirective, in order to see if they are of the types listed to be expected by the implementation of getSupportedTypes inside the specific handler.

It checks the values ascribed to the key inside the passed in scopedDirective, in order to see if they are of the types listed to be expected by the implementation of getSupportedTypes inside the specific handler.

Attributes

Returns:

Either a UsingDirectiveExpectationError or the using directive values of the scopedDirective grouped in string, boolean, or numeric sequences.

Inherited from:
DirectiveHandler
final protected def checkIfValuesAreExpected(scopedDirective: ScopedDirective): Either[BuildException, GroupedScopedValuesContainer]

It checks if the values assigned to the key of the scopedDirective have the expected type or number.

It checks if the values assigned to the key of the scopedDirective have the expected type or number.

Note: the correct functioning of this method for some of the handlers might require overriding the implementations for getSupportedTypes, getValueNumberBounds, and unexpectedValueHint inside those handlers.

Attributes

scopedDirective

the directive whose values are to be processed according to the key

Returns:

Either a BuildException or the grouped using directive values inside the passed scopedDirective

Inherited from:
DirectiveHandler
def descriptionMd: String

Attributes

Inherited from:
DirectiveHandler
def fromProduct(p: Product): MirroredMonoType

Create a new instance of type T with elements taken from product p.

Create a new instance of type T with elements taken from product p.

Attributes

Inherited from:
Singleton
protected def getSupportedTypes(key: String): Set[UsingDirectiveValueKind]

the default implementation only includes UsingDirectiveValueKind.STRING Override for changing it.

the default implementation only includes UsingDirectiveValueKind.STRING Override for changing it.

Attributes

key

the using directive key for which the supported types are calculated.

Returns:

a set of supported using directive value kinds of string, numeric, or boolean by this handler

Inherited from:
DirectiveHandler
final def isRestricted: Boolean

Attributes

Inherited from:
DirectiveHandler
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

checks if the passed in scopedDirective has the expected number of values according to the implementation of getValueNumberBounds for the handler on which this is called

checks if the passed in scopedDirective has the expected number of values according to the implementation of getValueNumberBounds for the handler on which this is called

Attributes

Returns:

Either a UsingDirectiveExpectationError or the same passed in scopedDirective

Inherited from:
DirectiveHandler
override def scalaSpecificationLevel: SpecificationLevel

Is this directive an advanved feature, that will not be accessible when running scala-cli as scala

Is this directive an advanved feature, that will not be accessible when running scala-cli as scala

Attributes

Definition Classes
Inherited from:
RequireDirectiveHandler
protected def unexpectedValueHint(key: String): String

The default implementation just asks the user to put quotation marks around the using directive values with string type.

The default implementation just asks the user to put quotation marks around the using directive values with string type.

Therefore, it should get overrided if other information is to be shown instead in any particular handler.

This method gets internally called in the implementation of checkAndGroupValuesByType for producing the error value.

Attributes

key

the using directive key for which the unexpected value(s) are passed.

Returns:

the hint to be shown to the user if the value(s) passed to the corresponding using directive key are unexpected.

Inherited from:
DirectiveHandler