private JClass mapType(Filter filter) throws JClassAlreadyExistsException { if (!(filter.getOption() == null || filter.getOption().isEmpty())) { return getParamTypeEnum(filter); } String type = filter.getType(); Class<?> typeCls = typeMap.get(type); checkState(typeCls != null, "Unexpected type: %s", type); return model.ref(typeCls); }