All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hisrc.jsonix.configuration.exception.AmbiguousPackageMappingNameException Maven / Gradle / Ivy

There is a newer version: 2.3.9
Show newest version
package org.hisrc.jsonix.configuration.exception;

import java.text.MessageFormat;
import java.util.Arrays;

import org.apache.commons.lang3.Validate;

public class AmbiguousPackageMappingNameException extends ConfigurationException {

	private static final long serialVersionUID = 277619834810758946L;
	private final String packageName;
	private final String[] mappingNames;

	public AmbiguousPackageMappingNameException(String packageName,
			String... mappingNames) {
		super(
				MessageFormat
						.format("Package [{0}] is mapped using different mapping names [{1}].",
								Validate.notNull(packageName),
								Arrays.asList(
										Validate.noNullElements(mappingNames))
										.toString()));
		this.packageName = packageName;
		this.mappingNames = mappingNames;
	}

	public String getPackageName() {
		return packageName;
	}

	public String[] getMappingNames() {
		return mappingNames;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy