introduced a JavaValue interface for some types