A java.util.Properties instance's attributes are directly addressable, e.g. prop.myKey
returns the value associated with myKey
. I want to replicate this behaviour.
How does it work?
There's nothing like Python's magic methods AFAIK in Java.
Specifically I want to create something like Properties
but which supports list values. I don't want to add extra dependencies (e.g. commons) so just want the simplest way of adding this. I've seen this answer and am trying to add it to a custom Properties class (I might subclass Properties, I don't mind either way).