Object/Class

com.twitter.util

Eval

Related Docs: class Eval | package util

Permalink

object Eval extends Eval

Evaluate a file or string and return the result.

Annotations
@deprecated
Deprecated

(Since version 1.8.1) use a throw-away instance of Eval instead

Linear Supertypes
Eval, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Eval
  2. Eval
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class ClassScopedResolver extends Resolver

    Permalink
    Definition Classes
    Eval
  2. class CompilerException extends Exception

    Permalink
    Definition Classes
    Eval
  3. class EvalSettings extends Settings

    Permalink
    Definition Classes
    Eval
  4. class FilesystemResolver extends Resolver

    Permalink
    Definition Classes
    Eval
  5. class IncludePreprocessor extends Preprocessor

    Permalink
    Definition Classes
    Eval
  6. trait Preprocessor extends AnyRef

    Permalink
    Definition Classes
    Eval
  7. class ResolutionFailedException extends Exception

    Permalink
    Definition Classes
    Eval
  8. trait Resolver extends AnyRef

    Permalink
    Definition Classes
    Eval

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. def apply[T](stream: InputStream): T

    Permalink

    val i: Int = new Eval()(getClass.getResourceAsStream("..."))

    val i: Int = new Eval()(getClass.getResourceAsStream("..."))

    Definition Classes
    Eval
  5. def apply[T](files: File*): T

    Permalink

    val i: Int = new Eval()(new File("..."))

    val i: Int = new Eval()(new File("..."))

    Definition Classes
    Eval
  6. def apply[T](code: String, resetState: Boolean = true): T

    Permalink

    val i: Int = new Eval()("1 + 1") // => 2

    val i: Int = new Eval()("1 + 1") // => 2

    Definition Classes
    Eval
  7. def applyProcessed[T](className: String, code: String, resetState: Boolean): T

    Permalink

    same as apply[T], but does not run preprocessors.

    same as apply[T], but does not run preprocessors.

    Definition Classes
    Eval
  8. def applyProcessed[T](code: String, resetState: Boolean): T

    Permalink

    same as apply[T], but does not run preprocessors.

    same as apply[T], but does not run preprocessors. Will generate a classname of the form Evaluater<unique>, where unique is computed from the jvmID (a random number) and a digest of code

    Definition Classes
    Eval
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def check(stream: InputStream): Unit

    Permalink

    Check if stream is Eval-able.

    Check if stream is Eval-able.

    Definition Classes
    Eval
    Exceptions thrown

    CompilerException if not Eval-able.

  11. def check(files: File*): Unit

    Permalink

    Check if files are Eval-able.

    Check if files are Eval-able.

    Definition Classes
    Eval
    Exceptions thrown

    CompilerException if not Eval-able.

  12. def check(code: String): Unit

    Permalink

    Check if code is Eval-able.

    Check if code is Eval-able.

    Definition Classes
    Eval
    Exceptions thrown

    CompilerException if not Eval-able.

  13. val classCleaner: Regex

    Permalink
  14. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. def compile(code: String): Unit

    Permalink

    Compile an entire source file into the virtual classloader.

    Compile an entire source file into the virtual classloader.

    Definition Classes
    Eval
  16. lazy val compilerMessageHandler: Option[Reporter]

    Permalink
    Attributes
    protected
    Definition Classes
    Eval
  17. lazy val compilerOutputDir: AbstractFile

    Permalink
    Definition Classes
    Eval
  18. lazy val compilerSettings: Settings

    Permalink
    Attributes
    protected
    Definition Classes
    Eval
  19. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  22. def findClass(className: String): Class[_]

    Permalink
    Definition Classes
    Eval
  23. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  25. lazy val impliedClassPath: List[String]

    Permalink
    Definition Classes
    Eval
  26. def inPlace[T](code: String): T

    Permalink

    Like Eval(), but doesn't reset the virtual classloader before evaluating.

    Like Eval(), but doesn't reset the virtual classloader before evaluating. So if you've loaded classes with compile, they can be referenced/imported in code run by inPlace.

    Definition Classes
    Eval
  27. final def isInstanceOf[T0]: Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef
  31. lazy val preprocessors: Seq[Preprocessor]

    Permalink

    Preprocessors to run the code through before it is passed to the Scala compiler.

    Preprocessors to run the code through before it is passed to the Scala compiler. if you want to add new resolvers, you can do so with new Eval(...) { lazy val preprocessors = {...} }

    Attributes
    protected
    Definition Classes
    Eval
  32. def sourceForString(code: String): String

    Permalink

    run preprocessors on our string, returning a String that is the processed source

    run preprocessors on our string, returning a String that is the processed source

    Definition Classes
    Eval
  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  34. def toSource(code: String): String

    Permalink

    converts the given file to evaluable source.

    converts the given file to evaluable source.

    Definition Classes
    Eval
  35. def toSource(file: File): String

    Permalink

    converts the given file to evaluable source.

    converts the given file to evaluable source. delegates to toSource(code: String)

    Definition Classes
    Eval
  36. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. def writeChecksum(checksum: String, file: File): Unit

    Permalink

    write the current checksum to a file

    write the current checksum to a file

    Definition Classes
    Eval

Inherited from Eval

Inherited from AnyRef

Inherited from Any

Ungrouped