for (String service : restServices)
{
try
{
Class<?> serviceClass = Class.forName(service);
RestService annot = serviceClass.getAnnotation(RestService.class);
if (cruxRest.containsKey(annot.value()))
{
throw new ServiceMapperException("Duplicated rest service [{"+annot.value()+"}]. Overiding previous registration...");
}
cruxRest.put(annot.value(), service);
}
catch (ClassNotFoundException e)
{
throw new ServiceMapperException("Error initializing rest service class.",e);
}