Fixed bug in generating Java class.