scala-java-interop
How can two coupled Scala generic type constructors refer to each other as type parameters?
In Java 1.6.0_21, the first example below compiles fine, and I think that\'s because the parameter type bounds are bare.That is, in the \"Z extends Zen\" bound below, Java allows[详细]
2023-02-22 13:47 分类:问答Why does Scala complain about illegal inheritance when there are raw types in the class hierarchy?
I\'m writing a wrapper that takes a Scala ObservableBuffer and fires events compatible with the Eclipse/JFace Databinding framework.[详细]
2023-02-10 21:22 分类:问答In Scala, how can I define a companion object for a class defined in Java?
I\'d like to add implicit conversions to Java classes generated by a modeling tool. So I want to add them to the companion object of those classes, so that the compiler automatically finds them. But I[详细]
2023-02-08 19:48 分类:问答Use java.util.Map from Scala
I need to use java-legacy code with the following method: public void doit(Map <String, Object> vals) {...}[详细]
2023-02-08 17:04 分类:问答Return a Java collection of type and subclasses from Scala
I have an interface in Java that looks something like this: public interface X<T> { Set<Class<? extends T>> getTypes();[详细]
2023-02-03 15:23 分类:问答Please explain use of Option's orNull method
Scala\'s Option class has a开发者_StackOverflow中文版n orNull method, whose signature is shown below.[详细]
2023-01-31 14:15 分类:问答is it possible to have a circular dependency between .java and .scala classes?
Lets say I have class A defined in .java file, and class B defined in .scala file. class A use class B and class B use class A.[详细]
2023-01-31 04:07 分类:问答Calling a protected static Java method from Scala
I have a library here with some Java classes. One class has some protected static methods, which I realize is sorta an OOP no-no but I can\'t change its code. Assuming I have a Scala class that subcla[详细]
2023-01-30 09:30 分类:问答Scala extra no-arg constructor plus default constructor parameters
I am using the Scala 2.8 default parameters on a constructor, and for Java compatibility reasons, I wanted a no-arg constructor that uses the default parameters.开发者_JAVA技巧[详细]
2023-01-22 05:50 分类:问答Migrating Java to Scala
What are the most important points to be aware of, and the workarounds, when gradually migrating an existing Java codebase to Scala?With a (potentially very开发者_Python百科 long) intermediate phase w[详细]
2023-01-20 22:50 分类:问答