1

I have a Scala object similar to the following:

object MyConfig {
  @PropertyManagerSources(Array("my.properties"))
  trait MyConfigOwner extends PropertyManagerConfig {
    @Key("my.key")
    def getSomething(): Boolean
}

This is using Owner to manage properties.

I am trying to access the trait within a java class like such:

import com.bah.cr.common.config.MyConfig.MyConfigOwner;

public class MyJavaClass{
  MyConfigOwner config = PropertyManagerConfig Factory.create(MyConfigOwner.class);
}

However, I get the error that MyConfig does not exist.

Thanks in advance.

Flash Death
  • 89
  • 1
  • 12
  • http://stackoverflow.com/questions/22356442/how-to-invoke-a-concrete-scala-trait-method-from-java?rq=1 – Ashalynd Apr 01 '15 at 18:01

1 Answers1

0

Turns out this works. My issue was an error in the package of the scala class.

Flash Death
  • 89
  • 1
  • 12