Home
last modified time | relevance | path

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

12

/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()
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()
DPackageResourceTable.java17 private final BiMap<Integer, ResName> resourceTable = HashBiMap.create(); field in PackageResourceTable
39 Integer id = resourceTable.inverse().get(resName); in getResourceId()
45 return resourceTable.get(resourceId); in getResName()
112 ResName existingEntry = resourceTable.put(resId, resName); in addResource()
120 Integer id = resourceTable.inverse().get(resName); in addResource()
123 ResName existing = resourceTable.put(id, resName); in addResource()
DStaxValueLoader.java10 public StaxValueLoader(PackageResourceTable resourceTable, String attrType, ResType resType) { in StaxValueLoader() argument
11 super(resourceTable, attrType, resType); in StaxValueLoader()
35 resourceTable.addResource(attrType, name, new TypedResource<>(s, resType, xmlContext)); in onEnd()
DStaxArrayLoader.java13 …public StaxArrayLoader(PackageResourceTable resourceTable, String attrType, ResType arrayResType, … in StaxArrayLoader() argument
14 super(resourceTable, attrType, arrayResType); in StaxArrayLoader()
48 resourceTable.addResource(attrType, name, new TypedResource<>(items, resType, xmlContext)); in onEnd()
DStaxPluralsLoader.java13 …public StaxPluralsLoader(PackageResourceTable resourceTable, String attrType, ResType charSequence… in StaxPluralsLoader() argument
14 super(resourceTable, attrType, charSequence); in StaxPluralsLoader()
49resourceTable.addResource(attrType, name, new PluralRules(new ArrayList<>(plurals), resType, xmlCo… in onEnd()
DStaxAttrLoader.java13 public StaxAttrLoader(PackageResourceTable resourceTable, String attrType, ResType resType) { in StaxAttrLoader() argument
14 super(resourceTable, attrType, resType); in StaxAttrLoader()
58 resourceTable.addResource(attrType, name, new TypedResource<>(attrData, resType, xmlContext)); in onEnd()
DStaxStyleLoader.java13 public StaxStyleLoader(PackageResourceTable resourceTable, String attrType, ResType resType) { in StaxStyleLoader() argument
14 super(resourceTable, attrType, resType); in StaxStyleLoader()
60resourceTable.addResource("style", styleData.getName(), new TypedResource<>(styleData, resType, xm… 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 …]
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()
DResourceParserTest.java16 private ResourceTable resourceTable; field in ResourceParserTest
23 resourceTable = resourceTableFactory.newResourceTable("org.robolectric", testResources()); in setUp()
31 …TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "drawable", "rainbow")… in shouldLoadDrawableXmlResources()
40 …TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "drawable", "an_image"… in shouldLoadDrawableBitmapResources()
49 …TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "drawable", "example_i… in shouldLoadDrawableBitmapResourcesDefinedByItemTag()
58 …TypedResource value = resourceTable.getValue(new ResName("org.robolectric", "id", "id_declared_in_… in shouldLoadIdResourcesDefinedByItemTag()
68 …TypedResource value2 = resourceTable.getValue(new ResName("org.robolectric", "id", "id_with_string… in whenIdItemsHaveStringContent_shouldLoadIdResourcesDefinedByItemTag()
DStaxPluralsLoaderTest.java15 private PackageResourceTable resourceTable; field in StaxPluralsLoaderTest
19 resourceTable = new ResourceTableFactory().newResourceTable("org.robolectric"); in setUp()
20 …StaxPluralsLoader pluralsLoader = new StaxPluralsLoader(resourceTable, "plurals", ResType.CHAR_SEQ… in setUp()
32 PluralRules pluralRules = (PluralRules) resourceTable.getValue(resName, new ResTable_config()); in testPluralsAreResolved()
DStyleResourceLoaderTest.java15 private PackageResourceTable resourceTable; field in StyleResourceLoaderTest
20 resourceTable = new ResourceTableFactory().newResourceTable("android", resourcePath); in setUp()
25 …TypedResource typedResource = resourceTable.getValue(new ResName("android", "style", "Theme_Holo")… in testStyleDataIsLoadedCorrectly()
DResourceTestUtil.java20 static String stringify(ResourceTable resourceTable) { in stringify() argument
22 resourceTable.receive(new ResourceTable.Visitor() { in stringify()
/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-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowAssetManager.java103 private ResourceTable resourceTable; field in ShadowAssetManager
149 resourceId = resourceTable.getResourceId(resName); in convertAndFill()
164 TypedResource dereferencedRef = resourceTable.getValue(resName, config); in convertAndFill()
194 TypedResource attrTypeData = resourceTable.getValue(attribute.resName, config); in convertAndFill()
225 resourceTable = RuntimeEnvironment.getAppResourceTable(); in __constructor__()
235resourceTable = isSystem ? RuntimeEnvironment.getSystemResourceTable() : RuntimeEnvironment.getApp… in __constructor__()
252 return resourceTable; in getResourceTable()
280 …Integer resourceId = resourceTable.getResourceId(ResName.qualifyResName(name, defPackage, defType)… in getResourceIdentifier()
322 ResName resName = resourceTable.getResName(ident); in getThemeValue()
439 (FileTypedResource) resourceTable.getValue(resName, config); in openNonAsset()
[all …]
DShadowResourcesImpl.java106 ResourceTable resourceTable = shadowAssetManager.getResourceTable(); in openRawResource() local
107 InputStream inputStream = resourceTable.getRawValue(id, shadowAssetManager.config); in openRawResource()
137 ResourceTable resourceTable = shadowOf(realResourcesImpl.getAssets()).getResourceTable(); in newNotFoundException() local
138 ResName resName = resourceTable.getResName(id); in newNotFoundException()
DShadowResources.java134 ResourceTable resourceTable = shadowAssetManager.getResourceTable(); in openRawResource() local
135 InputStream inputStream = resourceTable.getRawValue(id, shadowAssetManager.config); in openRawResource()
165 ResourceTable resourceTable = shadowOf(realResources.getAssets()).getResourceTable(); in newNotFoundException() local
166 ResName resName = resourceTable.getResName(id); in newNotFoundException()
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/android/
DXmlResourceParserImpl.java52 private final ResourceTable resourceTable; field in XmlResourceParserImpl
63 String applicationPackageName, ResourceTable resourceTable) { in XmlResourceParserImpl() argument
67 this.resourceTable = resourceTable; in XmlResourceParserImpl()
771 Integer resourceId = resourceTable.getResourceId(styleReference); in getResourceId()
780 Integer resourceId = resourceTable.getResourceId(resourceReference); in getResourceId()
788 Integer resourceId = resourceTable.getResourceId(resName); in getResourceId()
/external/robolectric-shadows/resources/src/main/java/org/robolectric/manifest/
DMetaData.java35 public void init(ResourceTable resourceTable, String packageName) throws RoboNotFoundException { in init() argument
45 valueMap.put(entry.getKey(), resourceTable.getResourceId(resName)); in init()
49 TypedResource<?> typedRes = resourceTable.getValue(resName, new ResTable_config()); in init()
/external/robolectric-shadows/robolectric/src/main/java/org/robolectric/
DRobolectricTestRunner.java519 PackageResourceTable resourceTable = appResourceTableCache.get(appManifest);
520 if (resourceTable == null) {
521 resourceTable = new ResourceMerger().buildResourceTable(appManifest);
523 appResourceTableCache.put(appManifest, resourceTable);
525 return resourceTable;

12