try
{
Class<?> deviceAdaptiveClass = Class.forName(deviceAdaptive);
if (deviceAdaptiveClass.isInterface() && !deviceAdaptiveClass.equals(DeviceAdaptive.class))
{
Templates templates = getChildTagTemplatesAnnotation(deviceAdaptiveClass);
if (templates == null)
{
throw new CrossDevicesException("DeviceAdaptive widget ["+deviceAdaptive+"] does not declare any templates. Use the annotation @Views to add templates to this widget.");
}
for (Template template : templates.value())
{
try
{
Package adaptiveDevicePackage = deviceAdaptiveClass.getPackage();
String templateResource = "/"+(adaptiveDevicePackage!=null?adaptiveDevicePackage.getName().replaceAll("\\.", "/"):"")+"/"+template.name()+".xdevice.xml";