@Test public void parse() { List<String> definitions = Arrays.asList( "file.count.max=2", " file.count.max=2 ", " file.count.max:2", "file.count.max:2;", "file.count.max:2\nfile.count.max:2" ); parseValidInternal(definitions); }
public static TransformDefinition parse(String definition) { definition = definition.trim(); if (definition.isEmpty()) { return new TransformDefinition(definition, Collections.emptyList(), new Properties()); } definition = definition.replace(";", "\n"); final Properties properties = new Properties(); final StringReader reader = new StringReader(definition); try { properties.load(reader); } catch (IOException e) { return new TransformDefinition(definition, Collections.emptyList(), properties); } final List<TransformAction> actions = TransformActionRegistry.create(properties); return new TransformDefinition(definition, actions, properties); }
TransformDefinition { public static TransformDefinition parse(String definition) { definition = definition.trim(); if (definition.isEmpty()) { return new TransformDefinition(definition, Collections.emptyList(), new Properties()); } definition = definition.replace(";", "\n"); final Properties properties = new Properties(); final StringReader reader = new StringReader(definition); try { properties.load(reader); } catch (IOException e) { return new TransformDefinition(definition, Collections.emptyList(), properties); } final List<TransformAction> actions = TransformActionRegistry.create(properties); return new TransformDefinition(definition, actions, properties); } }
TransformDefinition { public static TransformDefinition parse(String definition) { definition = definition.trim(); if (definition.isEmpty()) { return new TransformDefinition(definition, Collections.emptyList(), new Properties()); } definition = definition.replace(";", "\n"); final Properties properties = new Properties(); final StringReader reader = new StringReader(definition); try { properties.load(reader); } catch (IOException e) { return new TransformDefinition(definition, Collections.emptyList(), properties); } final List<TransformAction> actions = TransformActionRegistry.create(properties); return new TransformDefinition(definition, actions, properties); } private  TransformDefinition(String definition, List<TransformAction> actions,
                              Properties properties); }
TransformDefinition { public static TransformDefinition parse(String definition) { definition = definition.trim(); if (definition.isEmpty()) { return new TransformDefinition(definition, Collections.emptyList(), new Properties()); } definition = definition.replace(";", "\n"); final Properties properties = new Properties(); final StringReader reader = new StringReader(definition); try { properties.load(reader); } catch (IOException e) { return new TransformDefinition(definition, Collections.emptyList(), properties); } final List<TransformAction> actions = TransformActionRegistry.create(properties); return new TransformDefinition(definition, actions, properties); } private  TransformDefinition(String definition, List<TransformAction> actions,
                              Properties properties); String getDefinition(); List<TransformAction> getActions(); Properties getProperties(); static TransformDefinition parse(String definition); }
TransformDefinition { public static TransformDefinition parse(String definition) { definition = definition.trim(); if (definition.isEmpty()) { return new TransformDefinition(definition, Collections.emptyList(), new Properties()); } definition = definition.replace(";", "\n"); final Properties properties = new Properties(); final StringReader reader = new StringReader(definition); try { properties.load(reader); } catch (IOException e) { return new TransformDefinition(definition, Collections.emptyList(), properties); } final List<TransformAction> actions = TransformActionRegistry.create(properties); return new TransformDefinition(definition, actions, properties); } private  TransformDefinition(String definition, List<TransformAction> actions,
                              Properties properties); String getDefinition(); List<TransformAction> getActions(); Properties getProperties(); static TransformDefinition parse(String definition);  }