// Path: src/main/java/pl/maciejwalkowiak/plist/handler/Handler.java
// public interface Handler {
// 	boolean supports(Object object);
// 	String handle(Object object);
// }
// 
// Path: src/main/java/pl/maciejwalkowiak/plist/handler/HandlerNotFoundException.java
// public class HandlerNotFoundException extends Exception {
// 	public HandlerNotFoundException(String s) {
// 		super(s);
// 	}
// }


import pl.maciejwalkowiak.plist.handler.PlistSerializationException;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.ReflectionUtils;
import pl.maciejwalkowiak.plist.annotation.PlistAlias;
import pl.maciejwalkowiak.plist.annotation.PlistIgnore;
import pl.maciejwalkowiak.plist.handler.Handler;
import pl.maciejwalkowiak.plist.handler.HandlerNotFoundException;
import pl.maciejwalkowiak.plist.handler.HandlerWrapper;
	private String serializeField(Object o, Field field) {
		String result = "";

		int modifiers = field.getModifiers();

		if (!Modifier.isTransient(modifiers) && !Modifier.isStatic(modifiers)) {
			ReflectionUtils.makeAccessible(field);

			if (!field.isAnnotationPresent(PlistIgnore.class)) {
				result = processField(field, o).toString();
			} else {
				logger.debug("field {} is ignored", field.getName());
			}
		}

		return result;
	}

	private StringBuilder processField(Field field, Object object) {
		StringBuilder result = new StringBuilder();

		Object fieldValue = getFieldValue(field, object);

		if (fieldValue != null) {
			result.append(createKey(field));

			try {
				Handler handler = handlerWrapper.getHandlerForObject(fieldValue);

				result.append(handler.handle(fieldValue));
// Path: src/main/java/pl/maciejwalkowiak/plist/handler/Handler.java
// public interface Handler {
// 	boolean supports(Object object);
// 	String handle(Object object);
// }
// 
// Path: src/main/java/pl/maciejwalkowiak/plist/handler/HandlerNotFoundException.java
// public class HandlerNotFoundException extends Exception {
// 	public HandlerNotFoundException(String s) {
// 		super(s);
// 	}
// }


// Path: src/main/java/pl/maciejwalkowiak/plist/FieldSerializer.java
import pl.maciejwalkowiak.plist.handler.PlistSerializationException;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.ReflectionUtils;
import pl.maciejwalkowiak.plist.annotation.PlistAlias;
import pl.maciejwalkowiak.plist.annotation.PlistIgnore;
import pl.maciejwalkowiak.plist.handler.Handler;
import pl.maciejwalkowiak.plist.handler.HandlerNotFoundException;
import pl.maciejwalkowiak.plist.handler.HandlerWrapper;

	private String serializeField(Object o, Field field) {
		String result = "";

		int modifiers = field.getModifiers();

		if (!Modifier.isTransient(modifiers) && !Modifier.isStatic(modifiers)) {
			ReflectionUtils.makeAccessible(field);

			if (!field.isAnnotationPresent(PlistIgnore.class)) {
				result = processField(field, o).toString();
			} else {
				logger.debug("field {} is ignored", field.getName());
			}
		}

		return result;
	}

	private StringBuilder processField(Field field, Object object) {
		StringBuilder result = new StringBuilder();

		Object fieldValue = getFieldValue(field, object);

		if (fieldValue != null) {
			result.append(createKey(field));

			try {
				Handler handler = handlerWrapper.getHandlerForObject(fieldValue);

				result.append(handler.handle(fieldValue));
			} catch (HandlerNotFoundException e) {