Skip to content
Snippets Groups Projects
Commit c7abaef3 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Full funcional object now, root need to be in the constructor of class

parent 869e1851
No related branches found
No related tags found
No related merge requests found
......@@ -4,10 +4,11 @@ import java.io.File
import org.broadinstitute.sting.queue.util.Logging
trait Configurable extends Logging {
val globalConfig: Config
val configPath: List[String]
protected var configName = getClass.getSimpleName.toLowerCase
protected var configFullPath = configName :: configPath
val root: Configurable
val globalConfig: Config = if (root != null) root.globalConfig else new Config()
val configPath: List[String] = if (root != null) root.configFullPath else List()
protected val configName = getClass.getSimpleName.toLowerCase
protected val configFullPath = configName :: configPath
def config(key:String) = globalConfig(configName, configPath, key)
def config(key:String, default:Any) = globalConfig(configName, configPath, key, default)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment