@Retention(value=RUNTIME) @Target(value={TYPE,FIELD,PARAMETER,METHOD}) @Documented @Experimental(value="Allow you to map to a certain scalar class. Not covered by the specification. Subject to change.") public @interface ToScalar
public class Profile {
// Map a Scalar to another existing Scalar
@ToScalar(Scalar.Int.class)
private Long id;
// Map a POJO to another existing Scalar
@ToScalar(Scalar.String.class)
private IdNumber idNumber;
// Map a List of POJOs to a list of existing Scalars
@ToScalar(Scalar.String.class)
private List<Website> bookmarks;
// other getters/setters...
}
Copyright © 2018–2020. All rights reserved.