Code example for Properties

Methods: getProperty, size

0
    private final String qualifiers;
    private final int reportSdk;
    private final Class<?>[] shadows;
 
    public static Config fromProperties(Properties configProperties) {
      if (configProperties == null || configProperties.size() == 0) return null;
      return new Implementation( 
          Integer.parseInt(configProperties.getProperty("emulateSdk", "-1")),
          configProperties.getProperty("manifest", DEFAULT),
          configProperties.getProperty("qualifiers", ""),
          Integer.parseInt(configProperties.getProperty("reportSdk", "-1")),
          parseClasses(configProperties.getProperty("shadows", ""))
      ); 
    } 
 
    private static Class<?>[] parseClasses(String classList) {
      if (classList.length() == 0) return new Class[0];
      String[] classNames = classList.split("[, ]+");
      Class[] classes = new Class[classNames.length];
      for (int i = 0; i < classNames.length; i++) {
        try {