All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.codecommit.util.Thunkable.scala Maven / Gradle / Ivy

The newest version!
package com.codecommit.util

trait Thunkable {
  protected def thunk[A](field: Symbol) = {
    val ref = getClass.getDeclaredField(field.toString substring 1)
    ref.setAccessible(true)     // safe, because it's just us
    ref.get(this).asInstanceOf[() => A]
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy