/*-
* Copyright 2016 Diamond Light Source Ltd.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.dawnsci.json.test.classregistry;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.dawnsci.analysis.api.persistence.IClassRegistry;
import org.eclipse.dawnsci.json.test.testobject.CatWrapper;
/**
* Additional class registry, only used in JsonMarshallerClassRegistryTest. This is used
* to test issues relating to duplicate id's.
*
*/
public class TestObjectClashingIdClassRegistry implements IClassRegistry {
private static final Map<String, Class<?>> idToClassMap;
static {
Map<String, Class<?>> tmp = new HashMap<String, Class<?>>();
tmp.put("jsontest.animal", CatWrapper.class);
idToClassMap = Collections.unmodifiableMap(tmp);
}
@Override
public Map<String, Class<?>> getIdToClassMap() {
return idToClassMap;
}
}