Home
last modified time | relevance | path

Searched refs:resName (Results 1 – 25 of 78) sorted by relevance

1234

/external/robolectric-shadows/resources/src/main/java/org/robolectric/res/
DPackageResourceTable.java38 public Integer getResourceId(ResName resName) { in getResourceId() argument
39 Integer id = resourceTable.inverse().get(resName); in getResourceId()
40 if (id == null && resName != null && resName.name.contains(".")) { in getResourceId()
46 .get(new ResName(resName.packageName, resName.type, underscorize(resName.name))); in getResourceId()
57 public TypedResource getValue(@Nonnull ResName resName, ResTable_config config) { in getValue() argument
58 return resources.get(resName, config); in getValue()
66 @Override public XmlBlock getXml(ResName resName, ResTable_config config) { in getXml() argument
67 FileTypedResource fileTypedResource = getFileResource(resName, config); in getXml()
71 return XmlBlock.create(fileTypedResource.getFsFile(), resName.packageName); in getXml()
75 @Override public InputStream getRawValue(ResName resName, ResTable_config config) { in getRawValue() argument
[all …]
DRoutingResourceTable.java24 ResName resName = getResName(resId); in getRawValue() local
25 return resName != null ? getRawValue(resName, config) : null; in getRawValue()
28 @Override public TypedResource getValue(@Nonnull ResName resName, ResTable_config config) { in getValue() argument
29 return pickFor(resName).getValue(resName, config); in getValue()
33 ResName resName = pickFor(resId).getResName(resId); in getValue() local
34 return resName != null ? getValue(resName, config) : null; in getValue()
37 @Override public XmlBlock getXml(ResName resName, ResTable_config config) { in getXml() argument
38 return pickFor(resName).getXml(resName, config); in getXml()
41 @Override public InputStream getRawValue(ResName resName, ResTable_config config) { in getRawValue() argument
42 return pickFor(resName).getRawValue(resName, config); in getRawValue()
[all …]
DResBundle.java13 public void put(ResName resName, TypedResource value) { in put() argument
14 valuesMap.put(resName, value); in put()
17 public TypedResource get(ResName resName, ResTable_config config) { in get() argument
18 return valuesMap.pick(resName, config); in get()
30 public TypedResource pick(ResName resName, ResTable_config toMatch) { in pick() argument
31 List<TypedResource> values = map.get(resName); in pick()
47 resName.getFullyQualifiedName(), in pick()
54 public void put(ResName resName, TypedResource value) { in put() argument
55 if (!map.containsKey(resName)) { in put()
56 map.put(resName, new ArrayList<>()); in put()
[all …]
DAttributeResource.java15 public final @Nonnull ResName resName; field in AttributeResource
21 …public AttributeResource(@Nonnull ResName resName, @Nonnull String value, @Nonnull String contextP… in AttributeResource() argument
22 this(resName, value, contextPackageName, null); in AttributeResource()
25 …public AttributeResource(@Nonnull ResName resName, @Nonnull String value, @Nonnull String contextP… in AttributeResource() argument
27 …if (!resName.type.equals("attr")) throw new IllegalStateException("\"" + resName.getFullyQualified… in AttributeResource()
29 this.resName = resName; in AttributeResource()
64 "name='" + resName + '\'' + in toString()
DStyleData.java22 add(attributeResource.resName, attributeResource); in StyleData()
39 @Override public AttributeResource getAttrValue(ResName resName) { in getAttrValue() argument
40 AttributeResource attributeResource = items.get(resName); in getAttrValue()
46 …if (attributeResource == null && !"android".equals(resName.packageName) && !"android".equals(packa… in getAttrValue()
47 attributeResource = items.get(resName.withPackageName(packageName)); in getAttrValue()
49 … attributeResource = new AttributeResource(resName, attributeResource.value, resName.packageName); in getAttrValue()
57 for (ResName resName : items.keySet()) { in grep()
58 if (pattern.matcher(resName.getFullyQualifiedName()).find()) { in grep()
DResBunch.java11 public void put(ResName resName, TypedResource value) { in put() argument
12 ResBundle bundle = getBundle(resName.type); in put()
13 bundle.put(resName, value); in put()
25 public TypedResource get(@Nonnull ResName resName, ResTable_config config) { in get() argument
26 ResBundle bundle = getBundle(resName.type); in get()
27 return bundle.get(resName, config); in get()
DResName.java47 … ResName resName = qualifyResName(possiblyQualifiedResourceName, defaultPackageName, defaultType); in qualifyResourceName() local
48 return resName != null ? resName.getFullyQualifiedName() : null; in qualifyResourceName()
122 ResName resName = (ResName) o; in equals()
124 if (hashCode() != resName.hashCode()) return false; in equals()
126 if (!packageName.equals(resName.packageName)) return false; in equals()
127 if (!type.equals(resName.type)) return false; in equals()
128 if (!name.equals(resName.name)) return false; in equals()
DResourceTable.java10 Integer getResourceId(ResName resName); in getResourceId() argument
16 TypedResource getValue(@Nonnull ResName resName, ResTable_config config); in getValue() argument
18 XmlBlock getXml(ResName resName, ResTable_config config); in getXml() argument
20 InputStream getRawValue(ResName resName, ResTable_config config); in getRawValue() argument
/external/robolectric/resources/src/main/java/org/robolectric/res/
DPackageResourceTable.java39 public Integer getResourceId(ResName resName) { in getResourceId() argument
40 Integer id = resourceTable.inverse().get(resName); in getResourceId()
41 if (id == null && resName != null && resName.name.contains(".")) { in getResourceId()
47 .get(new ResName(resName.packageName, resName.type, underscorize(resName.name))); in getResourceId()
58 public TypedResource getValue(@Nonnull ResName resName, ResTable_config config) { in getValue() argument
59 return resources.get(resName, config); in getValue()
67 @Override public XmlBlock getXml(ResName resName, ResTable_config config) { in getXml() argument
68 FileTypedResource fileTypedResource = getFileResource(resName, config); in getXml()
72 return XmlBlock.create(fileTypedResource.getPath(), resName.packageName); in getXml()
76 @Override public InputStream getRawValue(ResName resName, ResTable_config config) { in getRawValue() argument
[all …]
DRoutingResourceTable.java24 ResName resName = getResName(resId); in getRawValue() local
25 return resName != null ? getRawValue(resName, config) : null; in getRawValue()
28 @Override public TypedResource getValue(@Nonnull ResName resName, ResTable_config config) { in getValue() argument
29 return pickFor(resName).getValue(resName, config); in getValue()
33 ResName resName = pickFor(resId).getResName(resId); in getValue() local
34 return resName != null ? getValue(resName, config) : null; in getValue()
37 @Override public XmlBlock getXml(ResName resName, ResTable_config config) { in getXml() argument
38 return pickFor(resName).getXml(resName, config); in getXml()
41 @Override public InputStream getRawValue(ResName resName, ResTable_config config) { in getRawValue() argument
42 return pickFor(resName).getRawValue(resName, config); in getRawValue()
[all …]
DResBundle.java13 public void put(ResName resName, TypedResource value) { in put() argument
14 valuesMap.put(resName, value); in put()
17 public TypedResource get(ResName resName, ResTable_config config) { in get() argument
18 return valuesMap.pick(resName, config); in get()
30 public TypedResource pick(ResName resName, ResTable_config toMatch) { in pick() argument
31 List<TypedResource> values = map.get(resName); in pick()
47 resName.getFullyQualifiedName(), in pick()
54 public void put(ResName resName, TypedResource value) { in put() argument
55 if (!map.containsKey(resName)) { in put()
56 map.put(resName, new ArrayList<>()); in put()
[all …]
DAttributeResource.java15 public final @Nonnull ResName resName; field in AttributeResource
21 …public AttributeResource(@Nonnull ResName resName, @Nonnull String value, @Nonnull String contextP… in AttributeResource() argument
22 this(resName, value, contextPackageName, null); in AttributeResource()
25 …public AttributeResource(@Nonnull ResName resName, @Nonnull String value, @Nonnull String contextP… in AttributeResource() argument
27 …if (!resName.type.equals("attr")) throw new IllegalStateException("\"" + resName.getFullyQualified… in AttributeResource()
29 this.resName = resName; in AttributeResource()
64 "name='" + resName + '\'' + in toString()
DStyleData.java22 add(attributeResource.resName, attributeResource); in StyleData()
39 @Override public AttributeResource getAttrValue(ResName resName) { in getAttrValue() argument
40 AttributeResource attributeResource = items.get(resName); in getAttrValue()
46 …if (attributeResource == null && !"android".equals(resName.packageName) && !"android".equals(packa… in getAttrValue()
47 attributeResource = items.get(resName.withPackageName(packageName)); in getAttrValue()
49 … attributeResource = new AttributeResource(resName, attributeResource.value, resName.packageName); in getAttrValue()
57 for (ResName resName : items.keySet()) { in grep()
58 if (pattern.matcher(resName.getFullyQualifiedName()).find()) { in grep()
DResBunch.java11 public void put(ResName resName, TypedResource value) { in put() argument
12 ResBundle bundle = getBundle(resName.type); in put()
13 bundle.put(resName, value); in put()
25 public TypedResource get(@Nonnull ResName resName, ResTable_config config) { in get() argument
26 ResBundle bundle = getBundle(resName.type); in get()
27 return bundle.get(resName, config); in get()
DResName.java50 … ResName resName = qualifyResName(possiblyQualifiedResourceName, defaultPackageName, defaultType); in qualifyResourceName() local
51 return resName != null ? resName.getFullyQualifiedName() : null; in qualifyResourceName()
122 ResName resName = (ResName) o; in equals()
124 if (hashCode() != resName.hashCode()) return false; in equals()
126 if (!packageName.equals(resName.packageName)) return false; in equals()
127 if (!type.equals(resName.type)) return false; in equals()
128 if (!name.equals(resName.name)) return false; in equals()
DResourceTable.java10 Integer getResourceId(ResName resName); in getResourceId() argument
16 TypedResource getValue(@Nonnull ResName resName, ResTable_config config); in getValue() argument
18 XmlBlock getXml(ResName resName, ResTable_config config); in getXml() argument
20 InputStream getRawValue(ResName resName, ResTable_config config); in getRawValue() argument
/external/robolectric/robolectric/src/test/java/org/robolectric/res/
DResBundleTest.java21 private ResName resName; field in ResBundleTest
25 resName = new ResName("a:b/c"); in setUp()
31 resMap.put(resName, val1); in closestMatchIsPicked()
33 resMap.put(resName, val2); in closestMatchIsPicked()
35 TypedResource v = resMap.pick(resName, from("v18")); in closestMatchIsPicked()
42 resMap.put(resName, val1); in firstValIsPickedWhenNoMatch()
44 resMap.put(resName, val2); in firstValIsPickedWhenNoMatch()
46 TypedResource v = resMap.pick(resName, from("en-v18")); in firstValIsPickedWhenNoMatch()
53 resMap.put(resName, val1); in bestValIsPickedForSdkVersion()
55 resMap.put(resName, val2); in bestValIsPickedForSdkVersion()
[all …]
DResNameTest.java52 ResName resName = new ResName("org.robolectric.example", "style", name); in hierarchicalNameHandlesWhiteSpace() local
53 assertThat(resName.name).isEqualTo("TextAppearance.AppCompat.Widget.ActionMode.Subtitle"); in hierarchicalNameHandlesWhiteSpace()
54 assertThat(resName.type).isEqualTo("style"); in hierarchicalNameHandlesWhiteSpace()
55 assertThat(resName.packageName).isEqualTo("org.robolectric.example"); in hierarchicalNameHandlesWhiteSpace()
63 ResName resName = new ResName("org.robolectric.example", "style", name); in simpleNameHandlesWhiteSpace() local
64 assertThat(resName.name).isEqualTo("Subtitle"); in simpleNameHandlesWhiteSpace()
65 assertThat(resName.type).isEqualTo("style"); in simpleNameHandlesWhiteSpace()
66 assertThat(resName.packageName).isEqualTo("org.robolectric.example"); in simpleNameHandlesWhiteSpace()
74 ResName resName = new ResName(name); in fullyQualifiedNameHandlesWhiteSpace() local
75 assertThat(resName.name).isEqualTo("TextAppearance.AppCompat.Widget.ActionMode.Subtitle"); in fullyQualifiedNameHandlesWhiteSpace()
[all …]
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/res/
DResBundleTest.java21 private ResName resName; field in ResBundleTest
25 resName = new ResName("a:b/c"); in setUp()
31 resMap.put(resName, val1); in closestMatchIsPicked()
33 resMap.put(resName, val2); in closestMatchIsPicked()
35 TypedResource v = resMap.pick(resName, from("v18")); in closestMatchIsPicked()
42 resMap.put(resName, val1); in firstValIsPickedWhenNoMatch()
44 resMap.put(resName, val2); in firstValIsPickedWhenNoMatch()
46 TypedResource v = resMap.pick(resName, from("en-v18")); in firstValIsPickedWhenNoMatch()
53 resMap.put(resName, val1); in bestValIsPickedForSdkVersion()
55 resMap.put(resName, val2); in bestValIsPickedForSdkVersion()
[all …]
DResNameTest.java51 ResName resName = new ResName("org.robolectric.example", "style", name); in hierarchicalNameHandlesWhiteSpace() local
52 assertThat(resName.name).isEqualTo("TextAppearance.AppCompat.Widget.ActionMode.Subtitle"); in hierarchicalNameHandlesWhiteSpace()
53 assertThat(resName.type).isEqualTo("style"); in hierarchicalNameHandlesWhiteSpace()
54 assertThat(resName.packageName).isEqualTo("org.robolectric.example"); in hierarchicalNameHandlesWhiteSpace()
62 ResName resName = new ResName("org.robolectric.example", "style", name); in simpleNameHandlesWhiteSpace() local
63 assertThat(resName.name).isEqualTo("Subtitle"); in simpleNameHandlesWhiteSpace()
64 assertThat(resName.type).isEqualTo("style"); in simpleNameHandlesWhiteSpace()
65 assertThat(resName.packageName).isEqualTo("org.robolectric.example"); in simpleNameHandlesWhiteSpace()
73 ResName resName = new ResName(name); in fullyQualifiedNameHandlesWhiteSpace() local
74 assertThat(resName.name).isEqualTo("TextAppearance.AppCompat.Widget.ActionMode.Subtitle"); in fullyQualifiedNameHandlesWhiteSpace()
[all …]
/external/robolectric-shadows/robolectric/src/main/java/org/robolectric/res/
DNullResourceTable.java11 public Integer getResourceId(ResName resName) { in getResourceId() argument
12 System.out.println("getResourceId(" + resName + ")"); in getResourceId()
30 public TypedResource getValue(@Nonnull ResName resName, ResTable_config config) { in getValue() argument
31 System.out.println("getValue(" + resName + ", \"" + config + "\")"); in getValue()
37 public XmlBlock getXml(ResName resName, ResTable_config config) { in getXml() argument
38 throw new UnsupportedOperationException("getXml " + resName); in getXml()
42 public InputStream getRawValue(ResName resName, ResTable_config config) { in getRawValue() argument
43 throw new UnsupportedOperationException("getRawValue " + resName); in getRawValue()
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowLegacyAssetManager.java161 ResName resName = attribute.getResourceReference(); in convertAndFill() local
165 resourceId = resourceTable.getResourceId(resName); in convertAndFill()
169 throw new Resources.NotFoundException("unknown resource " + resName); in convertAndFill()
180 TypedResource dereferencedRef = resourceTable.getValue(resName, config); in convertAndFill()
182 Logger.strict("couldn't resolve %s from %s", resName.getFullyQualifiedName(), attribute); in convertAndFill()
192 …attribute = new AttributeResource(attribute.resName, dereferencedRef.asString(), resName.packageNa… in convertAndFill()
210 TypedResource attrTypeData = getAttrTypeData(attribute.resName); in convertAndFill()
240 public TypedResource getAttrTypeData(ResName resName) { in getAttrTypeData() argument
241 return resourceTable.getValue(resName, config); in getAttrTypeData()
358 ResName resName = resourceTable.getResName(ident); in getThemeValue() local
[all …]
/external/robolectric/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowLegacyAssetManager.java159 ResName resName = attribute.getResourceReference(); in convertAndFill() local
163 resourceId = getResourceTable().getResourceId(resName); in convertAndFill()
167 throw new Resources.NotFoundException("unknown resource " + resName); in convertAndFill()
178 TypedResource dereferencedRef = getResourceTable().getValue(resName, config); in convertAndFill()
180 Logger.strict("couldn't resolve %s from %s", resName.getFullyQualifiedName(), attribute); in convertAndFill()
190 …attribute = new AttributeResource(attribute.resName, dereferencedRef.asString(), resName.packageNa… in convertAndFill()
208 TypedResource attrTypeData = getAttrTypeData(attribute.resName); in convertAndFill()
238 public TypedResource getAttrTypeData(ResName resName) { in getAttrTypeData() argument
239 return getResourceTable().getValue(resName, config); in getAttrTypeData()
354 ResName resName = getResourceTable().getResName(ident); in getThemeValue() local
[all …]
/external/cronet/third_party/icu/source/tools/genrb/
Dgenrb.cpp776 char *resName; in make_res_filename() local
791 basename = dirname = resName = 0; in make_res_filename()
812 resName = (char*) uprv_malloc(sizeof(char) * (uprv_strlen(dirname) in make_res_filename()
816 if(resName == 0) { in make_res_filename()
821 uprv_strcpy(resName, dirname); in make_res_filename()
825 uprv_strcat(resName, packageName); in make_res_filename()
826 uprv_strcat(resName, "_"); in make_res_filename()
829 uprv_strcat(resName, basename); in make_res_filename()
835 resName = (char*) uprv_malloc(sizeof(char) * (dirlen + pkgLen + basenamelen + 8)); in make_res_filename()
837 if (resName == NULL) { in make_res_filename()
[all …]
/external/icu/icu4c/source/tools/genrb/
Dgenrb.cpp776 char *resName; in make_res_filename() local
791 basename = dirname = resName = 0; in make_res_filename()
812 resName = (char*) uprv_malloc(sizeof(char) * (uprv_strlen(dirname) in make_res_filename()
816 if(resName == 0) { in make_res_filename()
821 uprv_strcpy(resName, dirname); in make_res_filename()
825 uprv_strcat(resName, packageName); in make_res_filename()
826 uprv_strcat(resName, "_"); in make_res_filename()
829 uprv_strcat(resName, basename); in make_res_filename()
835 resName = (char*) uprv_malloc(sizeof(char) * (dirlen + pkgLen + basenamelen + 8)); in make_res_filename()
837 if (resName == NULL) { in make_res_filename()
[all …]

1234