// Path: src/main/java/com/stacksync/syncservice/exceptions/InvalidReader.java
// public class InvalidReader extends Exception {
// 
// 	private static final long serialVersionUID = 3910376966796379039L;
// 
// 	public InvalidReader() {
// 		super();
// 	}
// 
// 	public InvalidReader(String message) {
// 		super(message);
// 	}
// 
// 	public InvalidReader(String message, Throwable cause) {
// 		super(message, cause);
// 	}
// 
// 	public InvalidReader(Throwable cause) {
// 		super(cause);
// 	}
// 	
// }
// 
// Path: src/main/java/com/stacksync/syncservice/exceptions/dao/DAOConfigurationException.java
// public class DAOConfigurationException extends Exception {
// 
//     // Constants ----------------------------------------------------------------------------------
// 
//     private static final long serialVersionUID = 1L;
// 
//     // Constructors -------------------------------------------------------------------------------
// 
//     /**
//      * Constructs a DAOConfigurationException with the given detail message.
//      * @param message The detail message of the DAOConfigurationException.
//      */
//     public DAOConfigurationException(String message) {
//         super(message);
//     }
// 
//     /**
//      * Constructs a DAOConfigurationException with the given root cause.
//      * @param cause The root cause of the DAOConfigurationException.
//      */
//     public DAOConfigurationException(Throwable cause) {
//         super(cause);
//     }
// 
//     /**
//      * Constructs a DAOConfigurationException with the given detail message and root cause.
//      * @param message The detail message of the DAOConfigurationException.
//      * @param cause The root cause of the DAOConfigurationException.
//      */
//     public DAOConfigurationException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
// }
// 
// Path: src/main/java/com/stacksync/syncservice/rpc/parser/IParser.java
// public interface IParser {
// 	public String createResponse(APIResponse m);
// }


import com.stacksync.syncservice.exceptions.InvalidReader;
import com.stacksync.syncservice.exceptions.dao.DAOConfigurationException;
import com.stacksync.syncservice.rpc.parser.IParser;
package com.stacksync.syncservice.rpc;


public class Reader {

	/**
	 * @throws DAOConfigurationException
	 * 
	 */
	public static IParser getInstance(String className) throws InvalidReader {
		try {
			if (className == null || className.isEmpty()) {
				throw new ClassNotFoundException("Class name is null or empty.");
			}

// Path: src/main/java/com/stacksync/syncservice/exceptions/InvalidReader.java
// public class InvalidReader extends Exception {
// 
// 	private static final long serialVersionUID = 3910376966796379039L;
// 
// 	public InvalidReader() {
// 		super();
// 	}
// 
// 	public InvalidReader(String message) {
// 		super(message);
// 	}
// 
// 	public InvalidReader(String message, Throwable cause) {
// 		super(message, cause);
// 	}
// 
// 	public InvalidReader(Throwable cause) {
// 		super(cause);
// 	}
// 	
// }
// 
// Path: src/main/java/com/stacksync/syncservice/exceptions/dao/DAOConfigurationException.java
// public class DAOConfigurationException extends Exception {
// 
//     // Constants ----------------------------------------------------------------------------------
// 
//     private static final long serialVersionUID = 1L;
// 
//     // Constructors -------------------------------------------------------------------------------
// 
//     /**
//      * Constructs a DAOConfigurationException with the given detail message.
//      * @param message The detail message of the DAOConfigurationException.
//      */
//     public DAOConfigurationException(String message) {
//         super(message);
//     }
// 
//     /**
//      * Constructs a DAOConfigurationException with the given root cause.
//      * @param cause The root cause of the DAOConfigurationException.
//      */
//     public DAOConfigurationException(Throwable cause) {
//         super(cause);
//     }
// 
//     /**
//      * Constructs a DAOConfigurationException with the given detail message and root cause.
//      * @param message The detail message of the DAOConfigurationException.
//      * @param cause The root cause of the DAOConfigurationException.
//      */
//     public DAOConfigurationException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
// }
// 
// Path: src/main/java/com/stacksync/syncservice/rpc/parser/IParser.java
// public interface IParser {
// 	public String createResponse(APIResponse m);
// }


// Path: src/main/java/com/stacksync/syncservice/rpc/Reader.java
import com.stacksync.syncservice.exceptions.InvalidReader;
import com.stacksync.syncservice.exceptions.dao.DAOConfigurationException;
import com.stacksync.syncservice.rpc.parser.IParser;

package com.stacksync.syncservice.rpc;


public class Reader {

	/**
	 * @throws DAOConfigurationException
	 * 
	 */
	public static IParser getInstance(String className) throws InvalidReader {
		try {
			if (className == null || className.isEmpty()) {
				throw new ClassNotFoundException("Class name is null or empty.");
			}

			IParser instance = (IParser) Class.forName(className).newInstance();