/*
 * Java Genetic Algorithm Library (@__identifier__@).
 * Copyright (c) @__year__@ Franz Wilhelmstötter
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Author:
 *    Franz Wilhelmstötter (franz.wilhelmstoetter@gmx.at)
 */
package org.jenetics.tool.trial;

import javax.xml.bind.DataBindingException;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;

import org.jenetics.internal.util.require;

/**
 * @author <a href="mailto:franz.wilhelmstoetter@gmx.at">Franz Wilhelmstötter</a>
 * @version 3.4
 * @since 3.4
 */
public final class jaxb {
	private jaxb() {require.noInstance();}

	private static final class JAXBContextHolder {
		private static final JAXBContext CONTEXT; static {
			try {
				CONTEXT = JAXBContext.newInstance(
					Sample.Model.class,
					Data.Model.class,
					DataSet.Model.class,
					TrialMeter.Model.class,
					Env.Model.class
				);
			} catch (JAXBException e) {
				throw new DataBindingException(
					"Something went wrong while creating JAXBContext.", e
				);
			}
		}
	}

	public static JAXBContext context() {
		return JAXBContextHolder.CONTEXT;
	}

}

@@ -772,125 +772,8 @@
 l;%0A%0A
-import javax.xml.bind.DataBindingException;%0Aimport javax.xml.bind.JAXBContext;%0Aimport javax.xml.bind.JAXBException;%0A%0A
 impo
@@ -812,16 +812,48 @@
 quire;%0A%0A
+import org.jenetics.util.ISeq;%0A%0A
 /**%0A * @
@@ -1036,159 +1036,110 @@
 %7D%0A%0A%09
-private static final class JAXBContextHolder %7B%0A%09%09private static final JAXBContext CONTEXT; static %7B%0A%09%09%09try %7B%0A%09%09%09%09CONTEXT = JAXBContext.newInstance(%0A%09%09%09
+/**%0A%09 * The JAXB classes of this package.%0A%09 */%0A%09public static final ISeq%3CClass%3C?%3E%3E CLASSES = ISeq.of(%0A
 %09%09Sa
@@ -1152,27 +1152,24 @@
 odel.class,%0A
-%09%09%09
 %09%09Data.Model
@@ -1176,19 +1176,16 @@
 .class,%0A
-%09%09%09
 %09%09DataSe
@@ -1199,19 +1199,16 @@
 .class,%0A
-%09%09%09
 %09%09TrialM
@@ -1225,19 +1225,16 @@
 .class,%0A
-%09%09%09
 %09%09Env.Mo
@@ -1248,237 +1248,10 @@
 ss%0A%09
-%09%09%09);%0A%09%09%09%7D catch (JAXBException e) %7B%0A%09%09%09%09throw new DataBindingException(%0A%09%09%09%09%09%22Something went wrong while creating JAXBContext.%22, e%0A%09%09%09%09);%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%0A%09public static JAXBContext context() %7B%0A%09%09return JAXBContextHolder.CONTEXT;%0A%09%7D
+);
 %0A%0A%7D%0A

Implement jaxb registry.