trait OnChangeRefresh extends ScalaScriptEngine
checks scala files for modification and if yes it recompiles the changed sources. This is not to be used by client code but rather be used by the rest of the refresh policy traits.
recheckEveryMillis should be provided. If <=0 then for every request for a class, the source file of the class is checked for modifications. If >0 then maximum 1 check will be performed every recheckEveryMillis milliseconds. A sensible value might be 1000 millis if code changes frequently (i.e. during dev) and 30000 millis if code doesn't change that often (i.e. production)
- Attributes
- protected
- Alphabetic
- By Inheritance
- OnChangeRefresh
- ScalaScriptEngine
- Logging
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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
cleanBuild: CodeVersion
forces a clean build of all source files
forces a clean build of all source files
- returns
the new CodeVersion
- Definition Classes
- ScalaScriptEngine
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
compilationStatus: CompilationStatus
- Definition Classes
- ScalaScriptEngine
-
val
config: Config
- Definition Classes
- ScalaScriptEngine
-
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.
- Definition Classes
- ScalaScriptEngine
-
def
createClassLoader: ScalaClassLoader
- Attributes
- protected
- Definition Classes
- ScalaScriptEngine
-
def
currentVersion: CodeVersion
- Definition Classes
- ScalaScriptEngine
-
def
debug(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
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.
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.
- Definition Classes
- ScalaScriptEngine
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
error(msg: String, e: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
error(msg: String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
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.
- Definition Classes
- OnChangeRefresh → ScalaScriptEngine
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
info(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isModified(sourcePath: SourcePath, clz: String): Boolean
- clz
the full class name
- returns
true if the scala file was modified since the last compilation
- Definition Classes
- ScalaScriptEngine
-
def
markAllAsModified(): Unit
marks all source files as modified, hence it will recompile all the source files on the next call to refresh()
marks all source files as modified, hence it will recompile all the source files on the next call to refresh()
- Definition Classes
- ScalaScriptEngine
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
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.
- Definition Classes
- ScalaScriptEngine
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- def numberOfTimesSourcesTestedForModifications: Long
-
def
refresh: CodeVersion
- Definition Classes
- ScalaScriptEngine
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
versionNumber: Int
- Definition Classes
- ScalaScriptEngine
-
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( ... )
-
def
warn(msg: String): Unit
- Attributes
- protected
- Definition Classes
- Logging