Class

scala.reflect.api.Constants

ConstantExtractor

Related Doc: package Constants

Permalink

abstract class ConstantExtractor extends AnyRef

An extractor class to create and pattern match with syntax Constant(value) where value is the Scala value of the constant.

Source
Constants.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ConstantExtractor
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ConstantExtractor()

    Permalink

Abstract Value Members

  1. abstract def apply(value: Any): Universe.Constant

    Permalink

    A factory method that produces Constant instances.

    A factory method that produces Constant instances.

    Notice that not any value can be passed to a constant: it must be either a primitive, a String, a type or a symbol. See the Constant class for more information.

  2. abstract def unapply(arg: Universe.Constant): Option[Any]

    Permalink

    An extractor that enables writing pattern matches against the Constant class.