Type[] actualTypeArguments = pt.getActualTypeArguments();
if (actualTypeArguments.length > 0) {
Type type = actualTypeArguments[actualTypeArguments.length - 1];
valueClass = getClassFromType(type);
} else {
throw new AchillesBeanMappingException("The type '" + genericType.getClass().getCanonicalName()
+ "' of the entity '" + entityClass.getCanonicalName() + "' should be parameterized");
}
} else {
throw new AchillesBeanMappingException("The type '" + genericType.getClass().getCanonicalName()
+ "' of the entity '" + entityClass.getCanonicalName() + "' should be parameterized");
}
log.trace("Inferred value class : {}", valueClass.getCanonicalName());