com.googlecode.scalascriptengine

ScalaScriptEngine

class ScalaScriptEngine extends Logging

The implementation of the script engine.

The engine works by refreshing the codeVersion. This means that, when the refresh() function is called and provided that the source files have changed, a compilation will be triggered. When the compilation is complete, a new codeVersion will be created and will be used till the next refresh.

This can be initialized standalone or by mixing in a refresh policy trait. If standalone, then refresh() should be manually invoked every time a change occurs in the source code.

If mixed in with a refresh policy, then the policy takes care of scanning the source code for changes and refreshing. Please check RefreshPolicies.scala

Typically this class will not be instantiated using 'new' but rather using one of the factory methods of the companion object. Instantiation offers the full amount of options that can be used by mixing in the various refresh policies and enhancers.

val sse = new ScalaScriptEngine(Config( Set(sourceDir), compilationClassPath, runtimeClasspath, outputDir)) with RefreshAsynchronously with FromClasspathFirst { val recheckEveryMillis: Long = 1000 // each file will only be checked maximum once per second }))

Linear Supertypes
Logging, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ScalaScriptEngine
  2. Logging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ScalaScriptEngine(config: Config)

Value Members

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

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

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

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

    Definition Classes
    Any
  5. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def compilationStatus: CompilationStatus

  7. val config: Config

  8. def constructors[T](className: String): Constructors[T]

    returns Constructors, this allows easy instantiation of the class using up to 4 constructor arguments.

    returns Constructors, this allows easy instantiation of the class using up to 4 constructor arguments.

    Constructors returned by this method are linked to the current codeversion. This means that, if codeversion is refreshed, a call to this will return an up to date Constructors instance. But also it means that the returned constructor will always create instances of that codeversion and will not reflect updates to the codeversion.

  9. def createClassLoader: ScalaClassLoader

    Attributes
    protected
  10. def currentVersion: CodeVersion

  11. def debug(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  12. def deleteAllClassesInOutputDirectory(): Unit

    please make sure outputDir is valid!!! If you used one of the factory methods to create an instance of the script engine, the output dir will be in the tmp directory.

  13. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  15. def error(msg: String, e: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  16. def error(msg: String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  17. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def get[T](className: String): Class[T]

    returns the Class[T] for className

    returns the Class[T] for className

    Can throw ClassNotFoundException if the class is not present. Can throw ClassCastException if the class is not of T Can trigger a compilation in the background or foreground, depending on the refresh policy.

  19. final def getClass(): Class[_]

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

    Definition Classes
    AnyRef → Any
  21. def info(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  22. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  23. def isModified(sourcePath: SourcePath, clz: String): Boolean

    clz

    the full class name

    returns

    true if the scala file was modified since the last compilation

  24. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  25. def newInstance[T](className: String): T

    returns a new instance of className.

    returns a new instance of className. The new instance is always of the latest codeversion.

  26. final def notify(): Unit

    Definition Classes
    AnyRef
  27. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  28. def refresh: CodeVersion

  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  30. def toString(): String

    Definition Classes
    AnyRef → Any
  31. def versionNumber: Int

  32. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. def warn(msg: String): Unit

    Attributes
    protected
    Definition Classes
    Logging

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped