LOGGER.debug("Expecting HierarchyIndex class for scanning WAR for JAX-RS Application class");
}
}
// Looked for annotated resources and providers
AnnotationIndex env = du.getAttachment(AnnotationIndex.class);
if (env == null)
{
LOGGER.debug("Expecting AnnotationRepository class for scanning WAR for JAX-RS classes");
return;
}
Set<Element<Path, Class<?>>> resources = null;
Set<Element<Provider, Class<?>>> providers = null;
if (resteasyDeploymentData.isScanResources())
{
resources = env.classIsAnnotatedWith(Path.class);
}
if (resteasyDeploymentData.isScanProviders())
{
providers = env.classIsAnnotatedWith(Provider.class);
}
if ((resources == null || resources.isEmpty()) && (providers == null || providers.isEmpty())) return;
if (resources != null)
{
for (Element e : resources)
{
if (e.getOwner().isInterface())
{
continue;
}
resteasyDeploymentData.getScannedResourceClasses().add(e.getOwnerClassName());
}
}
if (providers != null)
{
for (Element e : providers)
{
if (e.getOwner().isInterface()) continue;
resteasyDeploymentData.getScannedProviderClasses().add(e.getOwnerClassName());
}
}
Set<String> strings = env.classesImplementingInterfacesAnnotatedWith(Path.class.getName());
resteasyDeploymentData.getScannedResourceClasses().addAll(strings);
}