protected void doHandleClassParams(StringBuilder sb, Map<Parameter, Object> params,
boolean isJson, ParameterType... pType) {
Set<ParameterType> pTypes = new LinkedHashSet<ParameterType>(Arrays.asList(pType));
for (Map.Entry<Parameter, Object> entry : params.entrySet()) {
Parameter pm = entry.getKey();
Object obj = entry.getValue();
if (pTypes.contains(pm.getType())) {
Class<?> cls = obj instanceof Method
? ((Method)obj).getParameterTypes()[0] : ((Field)obj).getType();
Type type = obj instanceof Method
? ((Method)obj).getGenericParameterTypes()[0] : ((Field)obj).getGenericType();
Annotation[] ann = obj instanceof Method
? ((Method)obj).getParameterAnnotations()[0] : ((Field)obj).getAnnotations();
doWriteParam(sb, pm, cls, type, pm.getName(), ann, isJson);
}
}
}