Allows users to map a certain field or class to a scalar type
This is an experimental feature that might move to the spec.
Example:
public class Profile {
// Map a Scalar to another existing Scalar
@AdaptToScalar(Scalar.Int.class)
private Long id;
// Map a POJO to another existing Scalar
@AdaptToScalar(Scalar.String.class)
private IdNumber idNumber;
// Map a List of POJOs to a list of existing Scalars
@AdaptToScalar(Scalar.String.class)
private List<Website> bookmarks;
// other getters/setters...
}