trait AnalysisCallback extends AnyRef
- Alphabetic
- By Inheritance
- AnalysisCallback
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
api(sourceFile: VirtualFileRef, classApi: ClassLike): Unit
Register a public API entry coming from a given source file.
Register a public API entry coming from a given source file.
- sourceFile
Source file where
classApi
comes from.- classApi
The extracted public class API.
-
abstract
def
apiPhaseCompleted(): Unit
Communicate to the callback that the API phase has finished.
Communicate to the callback that the API phase has finished.
For instance, you can use this method it to wait on asynchronous tasks.
-
abstract
def
binaryDependency(onBinaryEntry: Path, onBinaryClassName: String, fromClassName: String, fromSourceFile: VirtualFileRef, context: DependencyContext): Unit
Indicate that the class
fromClassName
depends on a class namedonBinaryClassName
coming from class file or jaronBinaryEntry
.Indicate that the class
fromClassName
depends on a class namedonBinaryClassName
coming from class file or jaronBinaryEntry
.- onBinaryEntry
A binary entry represents either the jar or the concrete class file from which the Scala compiler knows that
onBinaryClassName
comes from.- onBinaryClassName
Dependent binary name. Binary name with JVM-like representation. Inner classes are represented with '$'. For more information on the binary name format, check section 13.1 of the Java Language Specification.
- fromClassName
Represent the class file name where
onBinaryClassName
is defined. Binary name with JVM-like representation. Inner classes are represented with '$'. For more information on the binary name format, check section 13.1 of the Java Language Specification.- fromSourceFile
Source file where
onBinaryClassName
is defined.- context
The kind of dependency established between
onClassName
andsourceClassName
.
- See also
xsbti.api.DependencyContext for more information on the context.
-
abstract
def
classDependency(onClassName: String, sourceClassName: String, context: DependencyContext): Unit
Indicate that the class
sourceClassName
depends on the classonClassName
.Indicate that the class
sourceClassName
depends on the classonClassName
.Note that only classes defined in source files included in the current compilation will passed to this method. Dependencies on classes generated by sources not in the current compilation will be passed as binary dependencies to the
binaryDependency
method.- onClassName
Class name being depended on.
- sourceClassName
Dependent class name.
- context
The kind of dependency established between
onClassName
andsourceClassName
.
- See also
xsbti.api.DependencyContext
-
abstract
def
classesInOutputJar(): Set[String]
Return class files in output jar at a given point in time.
Return class files in output jar at a given point in time.
When straight-to-jar compilation is enabled, the following entrypoint in the analysis callback tells the compiler which classes can be found in the jar used as a compilation target (where all class files will be store). The entrypoint will return all the paths to class files in Zinc format, an example would be
xsbti/AnalysisCallback.class
.This entrypoint serves two main purposes:
1. Before the dependency phase is run, it returns the class files found in the jar previous to the current compilation. 2. After dependency has run, when called again, it returns the class files written by the compiler in genbcode.
The second purpose is required because the compiler cannot communicate us via an internal programmatic API which files has written in genbcode and therefore we need to pay the price of opening the jar again to figure it out. If the compiler is to expose an entry point for this data, we can repurpose
classesInOutputJar
to only do 1). -
abstract
def
dependencyPhaseCompleted(): Unit
Communicate to the callback that the dependency phase has finished.
Communicate to the callback that the dependency phase has finished.
For instance, you can use this method it to wait on asynchronous tasks.
-
abstract
def
enabled(): Boolean
Return whether incremental compilation is enabled or not.
Return whether incremental compilation is enabled or not.
This method is useful to know whether the incremental compilation phase defined by
xsbt-analyzer
should be added. -
abstract
def
generatedLocalClass(source: VirtualFileRef, classFile: Path): Unit
Map the product relation between
classFile
andsource
to indicate thatclassFile
is the product of compilation fromsource
.Map the product relation between
classFile
andsource
to indicate thatclassFile
is the product of compilation fromsource
.- source
File that produced
classFile
.- classFile
File product of compilation of
source
.
-
abstract
def
generatedNonLocalClass(source: VirtualFileRef, classFile: Path, binaryClassName: String, srcClassName: String): Unit
Map the source class name (
srcClassName
) of a top-level Scala class coming from a given source file to a binary class name (binaryClassName
) coming from a given class file.Map the source class name (
srcClassName
) of a top-level Scala class coming from a given source file to a binary class name (binaryClassName
) coming from a given class file.This relation indicates that
classFile
is the product of compilation fromsource
.- source
File where
srcClassName
is defined.- classFile
File where
binaryClassName
is defined. This class file is the product ofsource
.- binaryClassName
Binary name with JVM-like representation. Inner classes are represented with '$'. For more information on the binary name format, check section 13.1 of the Java Language Specification.
- srcClassName
Class name as defined in
source
.
- abstract def getPickleJarPair(): Optional[T2[Path, Path]]
-
abstract
def
isPickleJava(): Boolean
Returns true if -Ypickle-java is on.
-
abstract
def
mainClass(sourceFile: VirtualFileRef, className: String): Unit
Register a class containing an entry point coming from a given source file.
Register a class containing an entry point coming from a given source file.
A class is an entry point if its bytecode contains a method with the following signature:
public static void main(String[] args);
- sourceFile
Source file where
className
is defined.- className
A class containing an entry point.
-
abstract
def
problem(what: String, pos: Position, msg: String, severity: Severity, reported: Boolean): Unit
Register a compilation problem.
Register a compilation problem.
This error may have already been logged or not. Unreported problems may happen because the reporting option was not enabled via command-line.
- what
The headline of the error.
- pos
At a given source position.
- msg
The in-depth description of the error.
- severity
The severity of the error reported.
- reported
Flag that confirms whether this error was reported or not.
-
abstract
def
startSource(source: VirtualFile): Unit
Set the source file mapped to a concrete
AnalysisCallback
.Set the source file mapped to a concrete
AnalysisCallback
.- source
Source file mapped to this instance of
AnalysisCallback
.
-
abstract
def
usedName(className: String, name: String, useScopes: EnumSet[UseScope]): Unit
Register the use of a
name
from a given source class name.Register the use of a
name
from a given source class name.- className
The source class name that uses
name
.- name
The source name used in
className
.- useScopes
Scopes(e.g. patmat, implicit) where name is used
className
.
-
abstract
def
api(sourceFile: File, classApi: ClassLike): Unit
This is kept around for sbt-dotty.
This is kept around for sbt-dotty.
- Annotations
- @Deprecated
- Deprecated
-
abstract
def
binaryDependency(onBinaryEntry: File, onBinaryClassName: String, fromClassName: String, fromSourceFile: File, context: DependencyContext): Unit
This is kept around for sbt-dotty.
This is kept around for sbt-dotty.
- Annotations
- @Deprecated
- Deprecated
-
abstract
def
generatedLocalClass(source: File, classFile: File): Unit
This is kept around for sbt-dotty.
This is kept around for sbt-dotty.
- Annotations
- @Deprecated
- Deprecated
-
abstract
def
generatedNonLocalClass(source: File, classFile: File, binaryClassName: String, srcClassName: String): Unit
This is kept around for sbt-dotty.
This is kept around for sbt-dotty.
- Annotations
- @Deprecated
- Deprecated
-
abstract
def
mainClass(sourceFile: File, className: String): Unit
This is kept around for sbt-dotty.
This is kept around for sbt-dotty.
- Annotations
- @Deprecated
- Deprecated
-
abstract
def
startSource(source: File): Unit
This is kept around for sbt-dotty.
This is kept around for sbt-dotty.
- Annotations
- @Deprecated
- Deprecated
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()