io.sphere.sdk.products.attributes.RichReferenceType Maven / Gradle / Ivy
package io.sphere.sdk.products.attributes;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.core.type.TypeReference;
import io.sphere.sdk.models.Reference;
public class RichReferenceType extends ReferenceType {
private final TypeReference> typeReference;
@JsonCreator
private RichReferenceType(final String referenceTypeId, final TypeReference> typeReference) {
super(referenceTypeId);
this.typeReference = typeReference;
}
public TypeReference> typeReference() {
return typeReference;
}
static RichReferenceType of(final String referenceTypeId, final TypeReference> typeReference) {
return new RichReferenceType<>(referenceTypeId, typeReference);
}
}