Skip to content

Commit 61abcd1

Browse files
committed
better javadoc I guess
1 parent d09f7f0 commit 61abcd1

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

jsonb/src/main/java/io/avaje/jsonb/Json.java

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,25 @@
225225

226226
}
227227

228-
/** Marks a Class as a MixIn class. */
228+
/**
229+
* Mark this Class as a MixIn Type that can add Jsonb Annotations on the specified type.
230+
* <p>
231+
* These types are typically in an external project / dependency or otherwise
232+
* types that we can't or don't want to explicitly annotate with {@code @Json}.
233+
* <p>
234+
* In the example below, the VehicleMixin class augments the the generated Vehicle JsonB adapter to use "ford-type" as the json property.
235+
*
236+
* <pre>{@code
237+
*
238+
* @Json.MixIn(Vehicle.class)
239+
* public abstract class VehicleMixIn {
240+
*
241+
* @Json.Property("ford-type")
242+
* private String type;
243+
* ...
244+
*
245+
* }</pre>
246+
*/
229247
@Retention(CLASS)
230248
@Target({ElementType.TYPE})
231249
@interface MixIn {

0 commit comments

Comments
 (0)