play.scalasupport.core

ScalaPlugin

class ScalaPlugin extends PlayPlugin

The ScalaPlugin in mainly responsible for compiling .scala files

As scala compilation is pretty slow, we try to optimize things a lot: The plugin will keep an in memory instance of the scala compiler. After each change to a scala file, it will check for dependent files and recompile only needed sources.

When a compilation error occurs we will try to recompile all sources to avoid problems.

We discard the in-memory compiler in some cases: - After a change in the .scala files set (adding or removing a scala file to the application) - When a modification to a scala file destroy some types (however if the type was anonymous we try to keep the compiler anyway)

Inherits

  1. PlayPlugin
  2. Comparable
  3. AnyRef
  4. Any

Type Members

  1. class PathChangeException extends Exception

Value Members

  1. def afterActionInvocation(): Unit

  2. def afterApplicationStart(): Unit

  3. def afterInvocation(): Unit

  4. def beforeActionInvocation(arg0: Method): Unit

  5. def beforeDetectingChanges(): Unit

  6. def beforeInvocation(): Unit

  7. def bind(arg0: String, arg1: java.lang.Class[_], arg2: Type, arg3: Array[Annotation], arg4: Map[String, Array[String]]): AnyRef

  8. def compareTo(arg0: PlayPlugin): Int

  9. def compile(sources: List[VirtualFile]): ArrayList[ApplicationClass]

    compiles all given source files

    compiles all given source files

    sources

    files to be compiled

  10. def compileAll(classes: List[ApplicationClass]): Unit

    compile all classes

    compile all classes

    classes

    classes to be compiled

  11. def detectChange(): Unit

    try to detect source changes

    try to detect source changes

  12. def enhance(arg0: ApplicationClass): Unit

  13. def equals(arg0: Any): Boolean

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence.

    The default implementations of this method is an equivalence relation:

    • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
    • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
    • It is transitive: for any instances x, y, and z of type AnyRef if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

    If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is often necessary to override hashCode to ensure that objects that are "equal" (o1.equals(o2) returns true) hash to the same Int (o1.hashCode.equals(o2.hashCode)).

    arg0

    the object to compare against this object for equality.

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    definition classes: AnyRef ⇐ Any
  14. def getStatus(): String

  15. def hashCode(): Int

    Returns a hash code value for the object

    Returns a hash code value for the object.

    The default hashing algorithm is platform dependent.

    Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

    definition classes: AnyRef ⇐ Any
  16. def invocationFinally(): Unit

  17. var lastHash: Int

  18. def onActionInvocationResult(arg0: Result): Unit

  19. def onApplicationStart(): Unit

  20. def onApplicationStop(): Unit

  21. def onClassesChange(modified: List[ApplicationClass]): Unit

    compile a class if a change was made

    compile a class if a change was made.

    modified

    classes that were modified

  22. def onConfigurationRead(): Unit

  23. def onEvent(arg0: String, arg1: Any): Unit

  24. def onInvocationException(arg0: Throwable): Unit

  25. def onLoad(): Unit

  26. def onRequestRouting(arg0: Route): Unit

  27. def onRoutesLoaded(): Unit

  28. def onTemplateCompilation(arg0: Template): Unit

  29. def rawInvocation(arg0: Request, arg1: Response): Boolean

  30. def reset(): Unit

  31. def routeRequest(arg0: Request): Unit

  32. def runTest(testClass: Class[BaseTest]): TestResults

    inject ScalaTestRunner into play's test framework

    inject ScalaTestRunner into play's test framework

    testClass

    a class under testing

  33. def scanSources: (ListBuffer[VirtualFile], Int)

    Scanning both java and scala sources for compilation

    Scanning both java and scala sources for compilation

  34. def serveStatic(arg0: VirtualFile, arg1: Request, arg2: Response): Boolean

  35. def toString(): String

    Returns a string representation of the object

    Returns a string representation of the object.

    The default representation is platform dependent.

    definition classes: AnyRef ⇐ Any

Instance constructors

  1. new ScalaPlugin()