All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.robolectric.res.OpaqueFileLoader Maven / Gradle / Ivy

There is a newer version: 3.4-rc2
Show newest version
package org.robolectric.res;

public class OpaqueFileLoader extends XmlLoader {
  private final ResBunch resBunch;
  private final String attrType;

  public OpaqueFileLoader(ResBunch resBunch, String attrType) {
    this.resBunch = resBunch;
    this.attrType = attrType;
  }

  @Override
  protected void processResourceXml(FsFile xmlFile, XpathResourceXmlLoader.XmlNode xmlNode, XmlContext xmlContext) throws Exception {
    resBunch.put(attrType, xmlFile.getBaseName(), new FileTypedResource<>(xmlFile.getPath(), ResType.LAYOUT), xmlContext);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy