Home
last modified time | relevance | path

Searched refs:resourceTable (Results 1 – 25 of 55) sorted by relevance

123

/external/robolectric-shadows/resources/src/main/java/org/robolectric/res/
DResourceTableFactory.java15 PackageResourceTable resourceTable = new PackageResourceTable("android"); in newFrameworkResourceTable()
18 addRClassValues(resourceTable, resourcePath.getRClass()); in newFrameworkResourceTable()
19 addMissingStyleableAttributes(resourceTable, resourcePath.getRClass()); in newFrameworkResourceTable()
22 addRClassValues(resourceTable, resourcePath.getInternalRClass()); in newFrameworkResourceTable()
23 addMissingStyleableAttributes(resourceTable, resourcePath.getInternalRClass()); in newFrameworkResourceTable()
26 parseResourceFiles(resourcePath, resourceTable); in newFrameworkResourceTable()
28 return resourceTable; in newFrameworkResourceTable()
41 PackageResourceTable resourceTable = new PackageResourceTable(packageName); in newResourceTable()
45 addRClassValues(resourceTable, resourcePath.getRClass()); in newResourceTable()
50 parseResourceFiles(resourcePath, resourceTable); in newResourceTable()
[all …]
DRoutingResourceTable.java18 for (PackageResourceTable resourceTable : resourceTables) { in RoutingResourceTable()
19 this.resourceTables.put(resourceTable.getPackageName(), resourceTable); in RoutingResourceTable() local
57 for (PackageResourceTable resourceTable : resourceTables.values()) { in receive()
58 resourceTable.receive(visitor); in receive()
68 for (PackageResourceTable resourceTable : resourceTables.values()) { in pickFor()
69 if (resourceTable.getPackageIdentifier() == ResourceIds.getPackageIdentifier(resId)) { in pickFor()
70 return resourceTable; in pickFor()
85 PackageResourceTable resourceTable = resourceTables.get(namespace); in pickFor() local
86 if (resourceTable == null) { in pickFor()
87 resourceTable = whichProvidesFor(namespace); in pickFor()
[all …]
DRawResourceLoader.java12 public void loadTo(PackageResourceTable resourceTable) { in loadTo() argument
13 load(resourceTable, "raw"); in loadTo()
14 load(resourceTable, "drawable"); in loadTo()
17 public void load(PackageResourceTable resourceTable, String folderBaseName) { in load() argument
24 loadRawFiles(resourceTable, folderBaseName, dir); in load()
28 …private void loadRawFiles(PackageResourceTable resourceTable, String resourceType, FsFile rawDir) { in loadRawFiles() argument
41 resourceTable.addResource(resourceType, fileBaseName, in loadRawFiles()
43 new XmlContext(resourceTable.getPackageName(), file, qualifiers))); in loadRawFiles()
DDrawableResourceLoader.java9 private final PackageResourceTable resourceTable; field in DrawableResourceLoader
11 DrawableResourceLoader(PackageResourceTable resourceTable) { in DrawableResourceLoader() argument
12 this.resourceTable = resourceTable; in DrawableResourceLoader()
62 XmlContext fakeXmlContext = new XmlContext(resourceTable.getPackageName(), f, qualifiers); in listDrawableResources()
63resourceTable.addResource(type, shortName, new FileTypedResource.Image(f, isNinePatch, fakeXmlCont… in listDrawableResources()
DPackageResourceTable.java17 private final BiMap<Integer, ResName> resourceTable = HashBiMap.create(); field in PackageResourceTable
39 Integer id = resourceTable.inverse().get(resName); in getResourceId()
44 resourceTable in getResourceId()
53 return resourceTable.get(resourceId); in getResName()
120 ResName existingEntry = resourceTable.put(resId, resName); in addResource()
132 Integer oldId = resourceTable.inverse().get(resNameWithUnderscores); in addResource()
134 resourceTable.forcePut(oldId, resName); in addResource()
137 Integer id = resourceTable.inverse().get(resName); in addResource()
140 ResName existing = resourceTable.put(id, resName); in addResource()
DStaxLoader.java8 protected final PackageResourceTable resourceTable; field in StaxLoader
12 public StaxLoader(PackageResourceTable resourceTable, String attrType, ResType resType) { in StaxLoader() argument
13 this.resourceTable = resourceTable; in StaxLoader()
/external/robolectric/resources/src/main/java/org/robolectric/res/
DResourceTableFactory.java16 PackageResourceTable resourceTable = new PackageResourceTable("android"); in newFrameworkResourceTable()
19 addRClassValues(resourceTable, resourcePath.getRClass()); in newFrameworkResourceTable()
20 addMissingStyleableAttributes(resourceTable, resourcePath.getRClass()); in newFrameworkResourceTable()
23 addRClassValues(resourceTable, resourcePath.getInternalRClass()); in newFrameworkResourceTable()
24 addMissingStyleableAttributes(resourceTable, resourcePath.getInternalRClass()); in newFrameworkResourceTable()
27 parseResourceFiles(resourcePath, resourceTable); in newFrameworkResourceTable()
29 return resourceTable; in newFrameworkResourceTable()
42 PackageResourceTable resourceTable = new PackageResourceTable(packageName); in newResourceTable()
46 addRClassValues(resourceTable, resourcePath.getRClass()); in newResourceTable()
51 parseResourceFiles(resourcePath, resourceTable); in newResourceTable()
[all …]
DRoutingResourceTable.java18 for (PackageResourceTable resourceTable : resourceTables) { in RoutingResourceTable()
19 this.resourceTables.put(resourceTable.getPackageName(), resourceTable); in RoutingResourceTable() local
57 for (PackageResourceTable resourceTable : resourceTables.values()) { in receive()
58 resourceTable.receive(visitor); in receive()
68 for (PackageResourceTable resourceTable : resourceTables.values()) { in pickFor()
69 if (resourceTable.getPackageIdentifier() == ResourceIds.getPackageIdentifier(resId)) { in pickFor()
70 return resourceTable; in pickFor()
85 PackageResourceTable resourceTable = resourceTables.get(namespace); in pickFor() local
86 if (resourceTable == null) { in pickFor()
87 resourceTable = whichProvidesFor(namespace); in pickFor()
[all …]
DRawResourceLoader.java15 public void loadTo(PackageResourceTable resourceTable) throws IOException { in loadTo() argument
16 load(resourceTable, "raw"); in loadTo()
17 load(resourceTable, "drawable"); in loadTo()
20 public void load(PackageResourceTable resourceTable, String folderBaseName) throws IOException { in load() argument
23 loadRawFiles(resourceTable, folderBaseName, dir); in load()
27 private void loadRawFiles(PackageResourceTable resourceTable, String resourceType, Path rawDir) in loadRawFiles() argument
39 resourceTable.addResource( in loadRawFiles()
45 new XmlContext(resourceTable.getPackageName(), file, qualifiers))); in loadRawFiles()
DPackageResourceTable.java18 private final BiMap<Integer, ResName> resourceTable = HashBiMap.create(); field in PackageResourceTable
40 Integer id = resourceTable.inverse().get(resName); in getResourceId()
45 resourceTable in getResourceId()
54 return resourceTable.get(resourceId); in getResName()
121 ResName existingEntry = resourceTable.put(resId, resName); in addResource()
133 Integer oldId = resourceTable.inverse().get(resNameWithUnderscores); in addResource()
135 resourceTable.forcePut(oldId, resName); in addResource()
138 Integer id = resourceTable.inverse().get(resName); in addResource()
141 ResName existing = resourceTable.put(id, resName); in addResource()
DDrawableResourceLoader.java11 private final PackageResourceTable resourceTable; field in DrawableResourceLoader
13 DrawableResourceLoader(PackageResourceTable resourceTable) { in DrawableResourceLoader() argument
14 this.resourceTable = resourceTable; in DrawableResourceLoader()
59 XmlContext fakeXmlContext = new XmlContext(resourceTable.getPackageName(), f, qualifiers); in listDrawableResources()
60resourceTable.addResource(type, shortName, new FileTypedResource.Image(f, isNinePatch, fakeXmlCont… in listDrawableResources()
DStaxLoader.java8 protected final PackageResourceTable resourceTable; field in StaxLoader
12 public StaxLoader(PackageResourceTable resourceTable, String attrType, ResType resType) { in StaxLoader() argument
13 this.resourceTable = resourceTable; in StaxLoader()
DStaxValueLoader.java10 public StaxValueLoader(PackageResourceTable resourceTable, String attrType, ResType resType) { in StaxValueLoader() argument
11 super(resourceTable, attrType, resType); in StaxValueLoader()
37 resourceTable.addResource(attrType, name, new TypedResource<>(s, resType, xmlContext)); in onEnd()
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/res/
DResourceTableTest.java13 private PackageResourceTable resourceTable; field in ResourceTableTest
17 resourceTable = new ResourceTableFactory().newResourceTable("myPackage"); in setUp()
22 resourceTable.addResource(0x02999999, "type", "name"); in getPackageName_shouldReturnPackageNameOfItsResources()
24 assertThat(resourceTable.getPackageName()).isEqualTo("myPackage"); in getPackageName_shouldReturnPackageNameOfItsResources()
29 resourceTable.addResource(0x02999999, "type", "name"); in getPackageIdentifier_shouldReturnPackageIdentiferOfItsResources()
31 assertThat(resourceTable.getPackageIdentifier()).isEqualTo(0x02); in getPackageIdentifier_shouldReturnPackageIdentiferOfItsResources()
36 resourceTable.addResource(0x02999999, "type", "name"); in addResource_shouldPreventMixedPackageIdentifiers()
37 resourceTable.addResource(0x03999999, "type", "name"); in addResource_shouldPreventMixedPackageIdentifiers()
42 resourceTable.addResource(0x02888888, "type", "name"); in shouldForbidIdClashes()
43 resourceTable.addResource(0x02999999, "type", "name"); in shouldForbidIdClashes()
[all …]
DResourceParserTest.java15 private ResourceTable resourceTable; field in ResourceParserTest
21 resourceTable = resourceTableFactory.newResourceTable("org.robolectric", testResources()); in setUp()
27 …TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "drawable", "rainbow")… in shouldLoadDrawableXmlResources()
36 …TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "drawable", "an_image"… in shouldLoadDrawableBitmapResources()
45 …TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "drawable", "example_i… in shouldLoadDrawableBitmapResourcesDefinedByItemTag()
54 …TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "id", "id_declared_in_… in shouldLoadIdResourcesDefinedByItemTag()
65 resourceTable.getValue( in whenIdItemsHaveStringContent_shouldLoadIdResourcesDefinedByItemTag()
DDrawableResourceLoaderNoRunnerTest.java38 private PackageResourceTable resourceTable; field in DrawableResourceLoaderNoRunnerTest
42 resourceTable = new ResourceTableFactory().newResourceTable("org.robolectric"); in setUp()
71 DrawableResourceLoader testLoader = new DrawableResourceLoader(resourceTable); in shouldFindDrawableResourcesWorkWithUnixJarFilePath()
74 …assertThat(resourceTable.getValue(new ResName("org.robolectric", "drawable", "foo"), new ResTable_… in shouldFindDrawableResourcesWorkWithUnixJarFilePath()
94 DrawableResourceLoader testLoader = new DrawableResourceLoader(resourceTable); in shouldFindDrawableResourcesWorkWithUnixFilePath()
97 …assertThat(resourceTable.getValue(new ResName("org.robolectric", "drawable", "foo"), new ResTable_… in shouldFindDrawableResourcesWorkWithUnixFilePath()
117 DrawableResourceLoader testLoader = new DrawableResourceLoader(resourceTable); in shouldFindDrawableResourcesWorkWithWindowsJarFilePath()
120 …assertThat(resourceTable.getValue(new ResName("org.robolectric", "drawable", "foo"), new ResTable_… in shouldFindDrawableResourcesWorkWithWindowsJarFilePath()
140 DrawableResourceLoader testLoader = new DrawableResourceLoader(resourceTable); in shouldFindDrawableResourcesWorkWithWindowsFilePath()
143 …assertThat(resourceTable.getValue(new ResName("org.robolectric", "drawable", "foo"), new ResTable_… in shouldFindDrawableResourcesWorkWithWindowsFilePath()
DRawResourceLoaderTest.java17 private PackageResourceTable resourceTable; field in RawResourceLoaderTest
21 resourceTable = new ResourceTableFactory().newResourceTable("packageName", testResources()); in setUp()
23 rawResourceLoader.loadTo(resourceTable); in setUp()
28 String f = (String) resourceTable.getValue(R.raw.raw_resource, new ResTable_config()).getData(); in shouldReturnRawResourcesWithExtensions()
34 String f = (String) resourceTable.getValue(R.raw.raw_no_ext, new ResTable_config()).getData(); in shouldReturnRawResourcesWithoutExtensions()
/external/robolectric/robolectric/src/test/java/org/robolectric/res/
DResourceTableTest.java14 private PackageResourceTable resourceTable; field in ResourceTableTest
18 resourceTable = new ResourceTableFactory().newResourceTable("myPackage"); in setUp()
23 resourceTable.addResource(0x02999999, "type", "name"); in getPackageName_shouldReturnPackageNameOfItsResources()
25 assertThat(resourceTable.getPackageName()).isEqualTo("myPackage"); in getPackageName_shouldReturnPackageNameOfItsResources()
30 resourceTable.addResource(0x02999999, "type", "name"); in getPackageIdentifier_shouldReturnPackageIdentiferOfItsResources()
32 assertThat(resourceTable.getPackageIdentifier()).isEqualTo(0x02); in getPackageIdentifier_shouldReturnPackageIdentiferOfItsResources()
37 resourceTable.addResource(0x02999999, "type", "name"); in addResource_shouldPreventMixedPackageIdentifiers()
40 () -> resourceTable.addResource(0x03999999, "type", "name")); in addResource_shouldPreventMixedPackageIdentifiers()
45 resourceTable.addResource(0x02888888, "type", "name"); in shouldForbidIdClashes()
48 () -> resourceTable.addResource(0x02999999, "type", "name")); in shouldForbidIdClashes()
[all …]
DResourceParserTest.java15 private ResourceTable resourceTable; field in ResourceParserTest
21 resourceTable = resourceTableFactory.newResourceTable("org.robolectric", testResources()); in setUp()
27 …TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "drawable", "rainbow")… in shouldLoadDrawableXmlResources()
36 …TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "drawable", "an_image"… in shouldLoadDrawableBitmapResources()
45 …TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "drawable", "example_i… in shouldLoadDrawableBitmapResourcesDefinedByItemTag()
54 …TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "id", "id_declared_in_… in shouldLoadIdResourcesDefinedByItemTag()
65 resourceTable.getValue( in whenIdItemsHaveStringContent_shouldLoadIdResourcesDefinedByItemTag()
DRawResourceLoaderTest.java17 private PackageResourceTable resourceTable; field in RawResourceLoaderTest
21 resourceTable = new ResourceTableFactory().newResourceTable("packageName", testResources()); in setUp()
23 rawResourceLoader.loadTo(resourceTable); in setUp()
28 String f = (String) resourceTable.getValue(R.raw.raw_resource, new ResTable_config()).getData(); in shouldReturnRawResourcesWithExtensions()
40 String f = (String) resourceTable.getValue(R.raw.raw_no_ext, new ResTable_config()).getData(); in shouldReturnRawResourcesWithoutExtensions()
DDrawableResourceLoaderNoRunnerTest.java19 private PackageResourceTable resourceTable; field in DrawableResourceLoaderNoRunnerTest
23 resourceTable = new ResourceTableFactory().newResourceTable("org.robolectric"); in setUp()
33 DrawableResourceLoader testLoader = new DrawableResourceLoader(resourceTable); in shouldFindDrawableResources()
36 …assertThat(resourceTable.getValue(new ResName("org.robolectric", "drawable", "foo"), new ResTable_… in shouldFindDrawableResources()
/external/robolectric-shadows/resources/src/test/java/org/robolectric/res/
DStaxValueLoaderTest.java18 private PackageResourceTable resourceTable; field in StaxValueLoaderTest
24 resourceTable = new PackageResourceTable("pkg"); in setUp()
33 .addHandler("string", new StaxValueLoader(resourceTable, "string", ResType.CHAR_SEQUENCE)) in ignoresXliffTags()
40 …assertThat(resourceTable.getValue(new ResName("pkg:string/preposition_for_date"), new ResTable_con… in ignoresXliffTags()
47 ….addHandler("item[@type='string']", new StaxValueLoader(resourceTable, "string", ResType.CHAR_SEQU… in ignoresBTags()
54 …assertThat(resourceTable.getValue(new ResName("pkg:string/sms_short_code_details"), new ResTable_c… in ignoresBTags()
/external/robolectric/resources/src/test/java/org/robolectric/res/
DStaxValueLoaderTest.java21 private PackageResourceTable resourceTable; field in StaxValueLoaderTest
27 resourceTable = new PackageResourceTable("pkg"); in setUp()
36 .addHandler("string", new StaxValueLoader(resourceTable, "string", ResType.CHAR_SEQUENCE)) in ignoresXliffTags()
43 …assertThat(resourceTable.getValue(new ResName("pkg:string/preposition_for_date"), new ResTable_con… in ignoresXliffTags()
50 ….addHandler("item[@type='string']", new StaxValueLoader(resourceTable, "string", ResType.CHAR_SEQU… in ignoresBTags()
57 …assertThat(resourceTable.getValue(new ResName("pkg:string/sms_short_code_details"), new ResTable_c… in ignoresBTags()
/external/robolectric/robolectric/src/main/java/org/robolectric/
DApkLoader.java21 PackageResourceTable resourceTable = appResourceTableCache.get(appManifest); in getAppResourceTable() local
22 if (resourceTable == null) { in getAppResourceTable()
23 resourceTable = new ResourceMerger().buildResourceTable(appManifest); in getAppResourceTable()
25 appResourceTableCache.put(appManifest, resourceTable); in getAppResourceTable()
27 return resourceTable; in getAppResourceTable()
/external/robolectric-shadows/robolectric/src/main/java/org/robolectric/
DApkLoader.java36 PackageResourceTable resourceTable = appResourceTableCache.get(appManifest); in getAppResourceTable() local
37 if (resourceTable == null) { in getAppResourceTable()
38 resourceTable = new ResourceMerger().buildResourceTable(appManifest); in getAppResourceTable()
40 appResourceTableCache.put(appManifest, resourceTable); in getAppResourceTable()
42 return resourceTable; in getAppResourceTable()

123