// Path: src/main/java/com/openthinks/easyweb/context/Bootstrap.java
// public interface Bootstrap {
// 	/**
// 	 * initial setting; such as:
// 	 * <ul>
// 	 * <li> database connection configuration</li>
// 	 * <li> file i/o</li>
// 	 * </ul>
// 	 */
// 	public void initial();
// 
// 	/**
// 	 * clear and release resources
// 	 */
// 	public void cleanUp();
// }
// 
// Path: src/main/java/com/openthinks/easyweb/context/NullBootstrap.java
// public class NullBootstrap implements Bootstrap {
// 
// 	@Override
// 	public void initial() {
// 	}
// 
// 	@Override
// 	public void cleanUp() {
// 	}
// 
// }


import com.openthinks.easyweb.annotation.configure.BootstrapClass;
import com.openthinks.easyweb.annotation.configure.EasyConfigure;
import com.openthinks.easyweb.annotation.configure.RequestSuffixs;
import com.openthinks.easyweb.annotation.configure.ScanPackages;
import com.openthinks.easyweb.annotation.configure.ScanWay;
import com.openthinks.easyweb.annotation.configure.ScanWay.ScanWayEnum;
import com.openthinks.easyweb.context.Bootstrap;
import com.openthinks.easyweb.context.NullBootstrap;
import com.openthinks.libs.utilities.InstanceUtilities;
import com.openthinks.libs.utilities.exception.CheckerNoPassException;

	}

	private void checkNecessaryAnnoation() throws CheckerNoPassException {
		if (configureClass.getAnnotation(EasyConfigure.class) == null)
			throw new CheckerNoPassException(getClass(), "checkNecessaryAnnoation");
		if (configureClass.getAnnotation(ScanPackages.class) == null)
			throw new CheckerNoPassException(getClass(), "checkNecessaryAnnoation");
		if (configureClass.getAnnotation(RequestSuffixs.class) == null)
			throw new CheckerNoPassException(getClass(), "checkNecessaryAnnoation");
	}

	@Override
	public String[] scanPackages() {
		ScanPackages packages = configureClass.getAnnotation(ScanPackages.class);
		return packages == null ? new String[] {} : packages.value();
	}

	@Override
	public String requestSuffix() {
		RequestSuffixs suffixs = configureClass.getAnnotation(RequestSuffixs.class);
		return suffixs == null ? "" : suffixs.value();
	}

	@Override
	public Bootstrap bootstarp() throws ClassNotFoundException, InstantiationException, IllegalAccessException {
		Class<?> bootstarp = this.configureClass;
		BootstrapClass bootAnnotation = configureClass.getAnnotation(BootstrapClass.class);
		if (bootAnnotation != null) {
			bootstarp = Class.forName(bootAnnotation.value());
		}

// Path: src/main/java/com/openthinks/easyweb/context/Bootstrap.java
// public interface Bootstrap {
// 	/**
// 	 * initial setting; such as:
// 	 * <ul>
// 	 * <li> database connection configuration</li>
// 	 * <li> file i/o</li>
// 	 * </ul>
// 	 */
// 	public void initial();
// 
// 	/**
// 	 * clear and release resources
// 	 */
// 	public void cleanUp();
// }
// 
// Path: src/main/java/com/openthinks/easyweb/context/NullBootstrap.java
// public class NullBootstrap implements Bootstrap {
// 
// 	@Override
// 	public void initial() {
// 	}
// 
// 	@Override
// 	public void cleanUp() {
// 	}
// 
// }


// Path: src/main/java/com/openthinks/easyweb/context/parser/WebConfigureAnnoationParser.java
import com.openthinks.easyweb.annotation.configure.BootstrapClass;
import com.openthinks.easyweb.annotation.configure.EasyConfigure;
import com.openthinks.easyweb.annotation.configure.RequestSuffixs;
import com.openthinks.easyweb.annotation.configure.ScanPackages;
import com.openthinks.easyweb.annotation.configure.ScanWay;
import com.openthinks.easyweb.annotation.configure.ScanWay.ScanWayEnum;
import com.openthinks.easyweb.context.Bootstrap;
import com.openthinks.easyweb.context.NullBootstrap;
import com.openthinks.libs.utilities.InstanceUtilities;
import com.openthinks.libs.utilities.exception.CheckerNoPassException;

	}

	private void checkNecessaryAnnoation() throws CheckerNoPassException {
		if (configureClass.getAnnotation(EasyConfigure.class) == null)
			throw new CheckerNoPassException(getClass(), "checkNecessaryAnnoation");
		if (configureClass.getAnnotation(ScanPackages.class) == null)
			throw new CheckerNoPassException(getClass(), "checkNecessaryAnnoation");
		if (configureClass.getAnnotation(RequestSuffixs.class) == null)
			throw new CheckerNoPassException(getClass(), "checkNecessaryAnnoation");
	}

	@Override
	public String[] scanPackages() {
		ScanPackages packages = configureClass.getAnnotation(ScanPackages.class);
		return packages == null ? new String[] {} : packages.value();
	}

	@Override
	public String requestSuffix() {
		RequestSuffixs suffixs = configureClass.getAnnotation(RequestSuffixs.class);
		return suffixs == null ? "" : suffixs.value();
	}

	@Override
	public Bootstrap bootstarp() throws ClassNotFoundException, InstantiationException, IllegalAccessException {
		Class<?> bootstarp = this.configureClass;
		BootstrapClass bootAnnotation = configureClass.getAnnotation(BootstrapClass.class);
		if (bootAnnotation != null) {
			bootstarp = Class.forName(bootAnnotation.value());
		}

		if (bootstarp != null && Bootstrap.class.isAssignableFrom(bootstarp)) {
