A lightweight, reflection-based utility to populate Java objects from Properties
.
Supports nested structures, collections, maps, interfaces (via class
property), and uses FromStringParsers
to support string-based conversions for individual properties.
- Populate object fields via
Properties
- Supports:
- Collections (inline or indexed)
- Maps (inline or recursive)
- Nested objects (recursively parsed)
- Polymorphism (via
.class
property)
- Works out of the box — no annotations or frameworks required
- Extensible with custom parsers via SPI (see vd-from-string-parser)
Feature | vd-from-properties-parser |
Spring Boot | Apache Commons Configuration | Owner |
---|---|---|---|---|
Works with plain Properties |
✅ | ❌ | ✅ | ✅ |
Deep/nested object support | ✅ | ✅ | ❌ | ❌ |
Custom parsers via SPI | ✅ | ❌ | ❌ | ❌ |
Reflection-based (no annotations) | ✅ | ❌ | ❌ | ❌ |
Lightweight (no framework) | ✅ | ❌ | ✅ | ✅ |
Inline:
collection=a,b,c
Using integer index:
collection.0=a
collection.1=b
collection.3=c
Using any index:
collection.a=a
collection.b=b
collection.z=c
With recursion:
collection.0.string=a
collection.1.string=b
View classes
public class MyObject {
public Collection<MySubObject> collection;
}
public class MySubObject {
public String string;
}
Inline:
map.abc=123
Using any index with explicit key and value:
map.0.key=abc
map.0.value=123
With recursion:
map.0.key.string=a
map.0.value.string=1
View classes
public class MyObject {
public Map<MySubObject, MySubObject> map;
}
public class MySubObject {
public String string;
}
Specify implementing class for an interface:
object.class=MyImplementation
object.string=abc