isCachedList = true; // else annotations were found in the cache
}
if(dependencyList == null) //not in production or the class hasn't been inspected yet
{
ResourceDependency dependency = inspectedClass.getAnnotation(ResourceDependency.class);
ResourceDependencies dependencies = inspectedClass.getAnnotation(ResourceDependencies.class);
if(dependency != null || dependencies != null)
{
//resource dependencies were found using one or both annotations, create and build a new list
dependencyList = new ArrayList<ResourceDependency>();
if(dependency != null)
{
dependencyList.add(dependency);
}
if(dependencies != null)
{
dependencyList.addAll(Arrays.asList(dependencies.value()));
}
}
else
{
dependencyList = Collections.emptyList();
}
}
//resource dependencies were found through inspection or from cache, handle them
if (dependencyList != null && !dependencyList.isEmpty())
{
for (int i = 0, size = dependencyList.size(); i < size; i++)
{
ResourceDependency dependency = dependencyList.get(i);
if (!rvc.isResourceDependencyAlreadyProcessed(dependency))
{
_handleAttachedResourceDependency(context, dependency, inspectedClass);
rvc.setResourceDependencyAsProcessed(dependency);
}