throws IllegalAccessException, IntrospectionException, InvocationTargetException {
if (!(serializer instanceof AnnotatedCompositeSerializer)) {
return new RangeBuilder().setStart(start, serializerFor(start.getClass()))
.setEnd(end, serializerFor(end.getClass())).build();
} else {
AnnotatedCompositeSerializer compositeSerializer = (AnnotatedCompositeSerializer) serializer;
CompositeRangeBuilder rangeBuilder = compositeSerializer.buildRange();
List<ComponentField> componentFields = componentFieldsForClass(start.getClass());
List<ComponentField> nonNullFields = new ArrayList<ComponentField>();
for (ComponentField field : componentFields) {
if ((field.getValue(start) != null) && field.getValue(end) != null) {
nonNullFields.add(field);