The DynamicJava interpreter should be modified to not just return the result of an evaluation, but also the type.
This would simplify and extend DrJava's ability to display the type of Watch expressions in the debugger.
See bug report 2957035: Unable to view watch variables
We do not have good type information, though, because there is no way to distinguish whether the interpreter returned a primitive or a boxed type right now. Also, handling both local variables and fields is messy right now, so local variables currently do not display type information.
Both of these problems can be addressed by also returning the type of an interpretation result. Even if we return an Integer(1), we can return int.class as type and therefore distinguish primitive and boxed types. We also do not have to treat fields and local variables separately; we can just evaluate both and display the result type.