resources/src/main/java/org/robolectric/res/ResourceTableFactory.java
public PackageResourceTable newResourceTable(String packageName, ResourcePath... resourcePaths) {
    return PerfStatsCollector.getInstance()
        .measure(
            "load legacy app resources",
            () -> {
              PackageResourceTable resourceTable = new PackageResourceTable(packageName);

              for (ResourcePath resourcePath : resourcePaths) {
                if (resourcePath.getRClass() != null) {
                  addRClassValues(resourceTable, resourcePath.getRClass());
                }
              }

              for (ResourcePath resourcePath : resourcePaths) {
                parseResourceFiles(resourcePath, resourceTable);
              }

              return resourceTable;
            });
  }
public PackageResourceTable newResourceTable(String packageName, ResourcePath... resourcePaths) {
    return PerfStatsCollector.getInstance()
        .measure(
            "load legacy app resources",
            () -> {
              PackageResourceTable resourceTable = new PackageResourceTable(packageName);

              for (ResourcePath resourcePath : resourcePaths) {
                if (resourcePath.getRClass() != null) {
                  addRClassValues(resourceTable, resourcePath.getRClass());
                }
              }

              for (ResourcePath resourcePath : resourcePaths) {
                parseResourceFiles(resourcePath, resourceTable);
              }

              return resourceTable;
            });
  }
public PackageResourceTable newResourceTable ( String packageName , ResourcePath ... resourcePaths ) { return PerfStatsCollector . getInstance ( ) . measure ( "load legacy app resources" , ( ) -> { PackageResourceTable resourceTable = new PackageResourceTable ( packageName ) ; for ( ResourcePath resourcePath : resourcePaths ) { if ( resourcePath . getRClass ( ) != null ) { addRClassValues ( resourceTable , resourcePath . getRClass ( ) ) ; } } for ( ResourcePath resourcePath : resourcePaths ) { parseResourceFiles ( resourcePath , resourceTable ) ; } return resourceTable ; } ) ; }
Creates an application resource table which can be constructed with multiple resources paths
representing overlayed resource libraries.
Creates an application resource table which can be constructed with multiple resources paths representing overlayed resource libraries .