I see this question: Scala: public static final in a class and this one, too: http://www.scala-lang.org/old/node/9178 but I can't make it work...
What I want to do is the Scala equivalent of the following Java code:
public class MyClass extends AnotherClass{
public static final String WSDL = MyConfig.getProp("...");
public static final String SERVICES = {new QName(MyConfig.getProp("..."))};
public MyClass(){
super(WSDL,SERVICES);
}
}
What I tried, based on what I searched, is:
class MyClass (wsdl: String, services: Array[QName])(implicit val config:MyConfigClass) extends AnotherClass(wsdl,services:_*){
val WSDL:String = config.getProp("...")
val SERVICES: Array[QName] = Array(new QName(config.getProp("...")))
def this() {
this(WSDL,SERVICES:_*)
}
}
But Scala IDE is telling me WSDL and SERVICES are unknown. Declaring WSDL and SERVICES at this point isn't supposed to be the equivalent for the Java MyClass.WSDL access?
Thanks for any solution, and for any explanation to make me scala more digestible...