Trait

scala.meta.internal.mtags

GlobalSymbolIndex

Related Doc: package mtags

Permalink

trait GlobalSymbolIndex extends AnyRef

An index to lookup the definition of global symbols.

Only indexes plain Scala and Java source files, no compilation needed.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GlobalSymbolIndex
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def addSourceFile(file: io.AbsolutePath, sourceDirectory: Option[io.AbsolutePath]): Unit

    Permalink

    Add an individual Java or Scala source file to the index.

    Add an individual Java or Scala source file to the index.

    file

    the absolute path to the source file, can be a path on disk or inside of a jar/zip file.

    sourceDirectory

    the enclosing project source directory if file is on disk, used to relativize file. Can be None if file is inside a zip file assuming the file path is already relativized by that point.

    Exceptions thrown

    Exception in case of problems processing the source file such as tokenization failure due to an unclosed literal.

  2. abstract def addSourceJar(jar: io.AbsolutePath): Unit

    Permalink

    Index a jar or zip file containing Scala and Java source files.

    Index a jar or zip file containing Scala and Java source files.

    Published artifacts typically have accompanying sources.jar files that include the project sources.

    Sources of a published library can be fetched from the command-line with coursier using the --sources flag:

    $ coursier fetch com.thoughtworks.qdox:qdox:2.0-M9 --sources
    $HOME/.coursier/cache/v1/https/repo1.maven.org/maven2/com/thoughtworks/qdox/qdox/2.0-M9/qdox-2.0-M9-sources.jar.coursier/cache/v1/https/repo1.maven.org/maven2/com/thoughtworks/qdox/qdox/2.0-M9/qdox-2.0-M9-sources.jar

    Sources can be fetched from an sbt build through the updateClassifiers task:

    val sourceJars = for {
      configurationReport <- updateClassifiers.in(input).value.configurations
      moduleReport <- configurationReport.modules
      (artifact, file) <- moduleReport.artifacts
      if artifact.classifier.contains("sources")
    } yield file
    jar

    the path to a single jar or zip file.

    Exceptions thrown

    Exception in case of problems processing the source file such as tokenization failure due to an unclosed literal.

  3. abstract def definition(symbol: Symbol): Option[SymbolDefinition]

    Permalink

    Lookup the definition of a global symbol.

    Lookup the definition of a global symbol.

    Returns the path of the file that defines the symbol but does not include the exact position of the definition. Computing the range position of the definition is not handled by this method, it is left for the user and can be done using the mtags module.

    symbol

    a global SemanticDB symbol. For comprehensive documentation of how a symbol is formatted consule the specification: https://scalameta.org/docs/semanticdb/specification.html#symbol Examples:

    "scala/Option#"                 // Option class
    "scala/Option."                 // Option companion object
    "scala/Option#.get()."          // `get` method for Option
    "scala/Predef.String#"          // String type alias in Predef
    "java/lang/String#format(+1)."  // Static `format` method for strings
    "java/util/Map#Entry#"          // Static inner interface.
    returns

    the definition of the symbol, if any.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  16. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped