title: How do I access Java enums from Scala?
body: <p>My java class is as follows</p>
  
  <pre><code>public class Test {
  
      protected enum TestEnum {A, B, C};
  
      public Test(TestEnum te) {
  
      }
  
  }
  </code></pre>
  
  <p>here is my Scala</p>
  
  <pre><code>class ScalaEnum(myEnum: TestEnum) extends Test(myEnum) {
  
  }
  </code></pre>
  
  <p>I receive the following error message</p>
  
  <p>class TestEnum in object Test cannot be accessed in object Test  Access to protected class TestEnum not permitted because  enclosing class class ScalaEnum in package XXX is not a subclass of   object Test in package YYY where target is defined</p>