Home
last modified time | relevance | path

Searched refs:xmlContext (Results 1 – 16 of 16) sorted by relevance

/external/robolectric-shadows/resources/src/main/java/org/robolectric/res/
DStaxStyleLoader.java21 public void onStart(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in StaxStyleLoader()
27 … public void onCharacters(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in StaxStyleLoader()
32 public void onEnd(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in StaxStyleLoader()
33 ResName attrResName = ResName.qualifyResName(attrName, xmlContext.getPackageName(), "attr"); in StaxStyleLoader()
34 …attributeResources.add(new AttributeResource(attrResName, buf.toString(), xmlContext.getPackageNam… in StaxStyleLoader()
40 public void onStart(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in onStart() argument
47 public void onEnd(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in onEnd() argument
57 …StyleData styleData = new StyleData(xmlContext.getPackageName(), name, styleParent, attributeResou… in onEnd()
59 …ble.addResource("style", styleData.getName(), new TypedResource<>(styleData, resType, xmlContext)); in onEnd()
DTypedResource.java8 private final XmlContext xmlContext; field in TypedResource
10 public TypedResource(T data, ResType resType, XmlContext xmlContext) { in TypedResource() argument
13 this.xmlContext = xmlContext; in TypedResource()
25 return xmlContext.getConfig(); in getConfig()
29 return xmlContext; in getXmlContext()
54 ", xmlContext=" + xmlContext + in toString()
DStaxArrayLoader.java18 public void onStart(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in StaxArrayLoader()
23 … public void onCharacters(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in StaxArrayLoader()
28 public void onEnd(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in StaxArrayLoader()
30 items.add(new TypedResource<>(buf.toString(), resType, xmlContext)); in StaxArrayLoader()
41 public void onStart(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in onStart() argument
47 public void onEnd(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in onEnd() argument
48 resourceTable.addResource(attrType, name, new TypedResource<>(items, resType, xmlContext)); in onEnd()
DStaxDocumentLoader.java24 protected void loadResourceXmlFile(XmlContext xmlContext) { in loadResourceXmlFile() argument
25 FsFile xmlFile = xmlContext.getXmlFile(); in loadResourceXmlFile()
30 doParse(xmlStreamReader, xmlContext); in loadResourceXmlFile()
43 protected void doParse(XMLStreamReader reader, XmlContext xmlContext) throws XMLStreamException { in doParse() argument
57 nodeHandler.onStart(reader, xmlContext); in doParse()
62 nodeHandler.onCharacters(reader, xmlContext); in doParse()
66 nodeHandler.onEnd(reader, xmlContext); in doParse()
DStaxPluralsLoader.java20 public void onStart(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in StaxPluralsLoader()
26 … public void onCharacters(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in StaxPluralsLoader()
31 public void onEnd(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in StaxPluralsLoader()
43 public void onStart(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in onStart() argument
48 public void onEnd(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in onEnd() argument
49 …eTable.addResource(attrType, name, new PluralRules(new ArrayList<>(plurals), resType, xmlContext)); in onEnd()
DStaxAttrLoader.java21 public void onStart(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in StaxAttrLoader()
36 … public void onCharacters(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in StaxAttrLoader()
40 public void onEnd(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in StaxAttrLoader()
46 public void onStart(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in onStart() argument
52 public void onEnd(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in onEnd() argument
58 resourceTable.addResource(attrType, name, new TypedResource<>(attrData, resType, xmlContext)); in onEnd()
DFileTypedResource.java6 public FileTypedResource(FsFile fsFile, ResType resType, XmlContext xmlContext) { in FileTypedResource() argument
7 super(fsFile.getPath(), resType, xmlContext); in FileTypedResource() local
28 public Image(FsFile fsFile, boolean isNinePatch, XmlContext xmlContext) { in Image() argument
29 super(fsFile, ResType.DRAWABLE, xmlContext); in Image()
DStaxValueLoader.java19 public void onStart(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in onStart() argument
25 public void onCharacters(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in onCharacters() argument
30 public void onEnd(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in onEnd() argument
37 resourceTable.addResource(attrType, name, new TypedResource<>(s, resType, xmlContext)); in onEnd()
DStaxLoader.java19 public void onStart(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in onStart() argument
23 public void onCharacters(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in onCharacters() argument
27 public void onEnd(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in onEnd() argument
DNodeHandler.java83 public void onStart(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in onStart() argument
86 public void onCharacters(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in onCharacters() argument
89 public void onEnd(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in onEnd() argument
DPluralRules.java6 public PluralRules(List<Plural> data, ResType resType, XmlContext xmlContext) { in PluralRules() argument
7 super(data, resType, xmlContext); in PluralRules()
DResourceTableFactory.java172 protected void loadResourceXmlFile(XmlContext xmlContext) {
173 resourceTable.addResource(type, xmlContext.getXmlFile().getBaseName(),
174 new FileTypedResource(xmlContext.getXmlFile(), resType, xmlContext));
DTextCollectingNodeHandler.java14 public void onCharacters(XMLStreamReader xml, XmlContext xmlContext) throws XMLStreamException { in onCharacters() argument
DDocumentLoader.java52 protected abstract void loadResourceXmlFile(XmlContext xmlContext); in loadResourceXmlFile() argument
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
DConverterTest.java20 private XmlContext xmlContext; field in ConverterTest
27 xmlContext = new XmlContext("", xmlFile, qualifiers); in setUp()
32 …l TypedResource<String> resource = new TypedResource<>(" 100 ", ResType.CHAR_SEQUENCE, xmlContext); in fromCharSequence_asInt_shouldHandleSpacesInString()
38 …esource<String> resource = new TypedResource<>(" Robolectric ", ResType.CHAR_SEQUENCE, xmlContext); in fromCharSequence_asCharSequence_shouldHandleSpacesInString()
44 …final TypedResource<String> resource = new TypedResource<>(" #aaaaaa ", ResType.COLOR, xmlContext); in fromColor_asInt_shouldHandleSpacesInString()
50 …al TypedResource<String> resource = new TypedResource<>(" #aaaaaa ", ResType.DRAWABLE, xmlContext); in fromDrawableValue_asInt_shouldHandleSpacesInString()
56 … final TypedResource<String> resource = new TypedResource<>(" 100 ", ResType.INTEGER, xmlContext); in fromInt_asInt_shouldHandleSpacesInString()
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/res/
DResBundleTest.java169 XmlContext xmlContext = mock(XmlContext.class); in shouldNotOverwriteValuesWithMatchingQualifiers() local
170 when(xmlContext.getQualifiers()).thenReturn(Qualifiers.parse("--")); in shouldNotOverwriteValuesWithMatchingQualifiers()
171 when(xmlContext.getConfig()).thenReturn(new ResTable_config()); in shouldNotOverwriteValuesWithMatchingQualifiers()
172 when(xmlContext.getPackageName()).thenReturn("org.robolectric"); in shouldNotOverwriteValuesWithMatchingQualifiers()
174 … TypedResource firstValue = new TypedResource<>("first_value", ResType.CHAR_SEQUENCE, xmlContext); in shouldNotOverwriteValuesWithMatchingQualifiers()
175 …TypedResource secondValue = new TypedResource<>("second_value", ResType.CHAR_SEQUENCE, xmlContext); in shouldNotOverwriteValuesWithMatchingQualifiers()