public class ClassFileManager extends ForwardingJavaFileManager {
public ClassFileManager(StandardJavaFileManager standardManager) {
super(standardManager);
}
...
}
became
But then I get
scala: constructor ForwardingJavaFileManager in class ForwardingJavaFileManager cannot be accessed in package svm
Access to protected constructor ForwardingJavaFileManager not permitted because
enclosing package svm is not a subclass of
class ForwardingJavaFileManager in package tools where target is defined
class ClassFileManager(fileManager: StandardJavaFileManager)
^
Which kind of makes sense, but is also rather odd. For some reason the protected constructor is being called in the scope of the external package (svm) and not in the scope of the class (ClassFileManager). Why is this the case? And is there any idiomatic way of doing this?
It works in Java, but looking at how many lines of code I saved writing the rest of this in Scala, I'd prefer to keep it in Scala if at all possible.