fix java 7/8 compatibility issue: cast type to class to get the name
prepare 0.6.1