diff --git a/tools/src/main/java/com/threerings/tools/JSONConversion.java b/tools/src/main/java/com/threerings/tools/JSONConversion.java index 222e8c04..56dc7801 100644 --- a/tools/src/main/java/com/threerings/tools/JSONConversion.java +++ b/tools/src/main/java/com/threerings/tools/JSONConversion.java @@ -47,16 +47,16 @@ import net.sf.json.JSONObject; * Config cfg = new Config(); * System.out.println(cfg.convert(new Pojo())); * - * Converting a type universally:
+ * Converting a type universally:*/ public class JSONConversion {{@code Converter<Color> colorConv = new Converter<Color>() { public Object convert (Color c, Config cfg) { - return new Integer((c.getRed() << 16) | (c.getGreen()<<8) | c.getBlue()); + return new Integer((c.getRed() << 16) | (c.getGreen() << 8) | c.getBlue()); } }; cfg.addClassConverter(Color.class, colorConv); - *- * Customizing a specific field of a class:+ * }+ * Customizing a specific field of a class:{@code FieldAccessor<SomeImpl, Collection<?>> entryConv = new FieldAccessor<SomeImpl, Collection<?>>() { public Collection<SomeValue> get (SomeImpl impl) { @@ -66,7 +66,7 @@ import net.sf.json.JSONObject; cfg.addFieldConfig(SomeImpl.class, new FieldConfig<SomeImpl>(). addExclusions("privateStuff"). addFieldConverter("valueMap", new ConvertCollectionFieldToArray<SomeImpl>(entryConv))); - *+ * }