if javaType is an enum, please use a switch here