diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/ajax/JSONPojoConvertor.java b/jetty-util/src/main/java/org/eclipse/jetty/util/ajax/JSONPojoConvertor.java index 797b3c43347..fcbcb7f22dd 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/ajax/JSONPojoConvertor.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/ajax/JSONPojoConvertor.java @@ -34,8 +34,6 @@ import org.eclipse.jetty.util.log.Log; * - the getters/setters are resolved at initialization (JSONObjectConverter resolves it at runtime) * - correctly sets the number fields * - * - * */ public class JSONPojoConvertor implements JSON.Convertor { @@ -53,22 +51,38 @@ public class JSONPojoConvertor implements JSON.Convertor protected Map _getters = new HashMap(); protected Map _setters = new HashMap(); protected Set _excluded; - + + /** + * @param pojoClass The class to convert + */ public JSONPojoConvertor(Class pojoClass) { this(pojoClass, (Set)null, true); } - + + /** + * @param pojoClass The class to convert + * @param excluded The fields to exclude + */ public JSONPojoConvertor(Class pojoClass, String[] excluded) { this(pojoClass, new HashSet(Arrays.asList(excluded)), true); } - + + /** + * @param pojoClass The class to convert + * @param excluded The fields to exclude + */ public JSONPojoConvertor(Class pojoClass, Set excluded) { this(pojoClass, excluded, true); } - + + /** + * @param pojoClass The class to convert + * @param excluded The fields to exclude + * @param fromJSON If true, add a class field to the JSON + */ public JSONPojoConvertor(Class pojoClass, Set excluded, boolean fromJSON) { _pojoClass = pojoClass; @@ -76,7 +90,11 @@ public class JSONPojoConvertor implements JSON.Convertor _fromJSON = fromJSON; init(); } - + + /** + * @param pojoClass The class to convert + * @param fromJSON If true, add a class field to the JSON + */ public JSONPojoConvertor(Class pojoClass, boolean fromJSON) { this(pojoClass, (Set)null, fromJSON);